upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/shader_validation.md
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-23 17:40:56 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-23 17:40:56 -0500
commite10ec61417e60d059cdb89c96e7b0d607fed537f (patch)
tree99f63513f95eae2093fda6566cd12b9a117fe183 /docs/shader_validation.md
parentd0c0fe437a97880e2efb566bdcd14a6833786dba (diff)
parente3edd59a185fcec8f652db23f67c8f5e00739e2a (diff)
Merge remote-tracking branch 'origin/pr/8987'
Diffstat (limited to 'docs/shader_validation.md')
-rw-r--r--docs/shader_validation.md24
1 files changed, 21 insertions, 3 deletions
diff --git a/docs/shader_validation.md b/docs/shader_validation.md
index e8e283b11..97338f24b 100644
--- a/docs/shader_validation.md
+++ b/docs/shader_validation.md
@@ -2305,9 +2305,27 @@ used the first flag without the second, and its generated vertex shader wrote th
2305both GPUs, with both flags and by default they are within 2e-3 on both, and `ps_interp_f32_mods` / `ps_interp_mov_mods` 2305both GPUs, with both flags and by default they are within 2e-3 on both, and `ps_interp_f32_mods` / `ps_interp_mov_mods`
2306(plain f32 and mov reads) are exact with `--bary-fallback`. `ps_sweep.py` now builds the vertex shader of a pixel 2306(plain f32 and mov reads) are exact with `--bary-fallback`. `ps_sweep.py` now builds the vertex shader of a pixel
2307shader with `f16_halves` in its index entry so that the halves are decoded from the same words a default translation 2307shader with `f16_halves` in its index entry so that the halves are decoded from the same words a default translation
2308reads per vertex. Not shown: the 61 individually (a 12-shader subset of the 190 agreed between the two translations on 2308reads per vertex. An exhaustive follow-up on all `480` sampled shaders (`--seed 20261122`, `main` at `dde82f27e`)
2309the RTX 4080 SUPER; draws of these shaders take about 20 s each). Only 9 of the 480 read raw 2309and all `12,101` PS confirmed this on an AMD Radeon RX 6650 XT (RDNA2, Windows 11 driver `32.0.21045.29003`,
2310barycentrics and need the geometry shader; all 9 agree on both GPUs. 2310`vk_ps_sweep` variant `z`, `--timeout 30`): `29` of `12,101` PS use `MinLod` (`image_sample_d_cl`, `273` occurrences;
2311`10` also have `v_interp_*_f16`, `0` read raw barycentrics), and `0` of the `480` sampled PS declare `MinLod`, so
2312the MinLod fallback plays no part in this `480`-shader difference. Across the `480` shaders, `272` modules are
2313byte-identical across all three translations, `10` are refused (`computed I/J pair under --bary-fallback`), and
2314`198` differ (`186` reading `v_interp_*_f16` — all `186` using `high` — `12` reading raw barycentrics with
2315`.bary_gs.spv`, `0` combining both in the sample; across all `12,101` PS, `5` combine both, of which `3` translate
2316under `--bary-fallback --f16-interp-fallback` + `.bary_gs.spv` and `2` hit `computed I/J pair under --bary-fallback`).
2317On the `198` differing shaders on the RX 6650 XT, `default` vs `--bary-fallback` alone gave `90` OK on both (all `12`
2318raw-bary GS draws plus `78` `v_interp_*_f16`), `54` differing beyond tolerance (`53` gross `>0.1`, `1` moderate
2319`>1e-2`), `9` NaN or zero on one side (`8` NaN on `default` only with `371`/`507`/`960` NaNs, `1` zero on `default`
2320only), `12` driver crashes on both (`0xC0000005`, unchanged with an 8 MiB stack), and `33` timeouts; all `63`
2321differing/NaN/zero draws are `v_interp_*_f16` shaders where the default sweep vertex shader without `f16_halves` wrote
2322smooth `[0, 1]` `f32` bits that `PerVertexKHR` `UnpackHalf2x16` interpreted as negative or large `f16` values (feeding
2323`sqrt`/`log`/`pow`), whereas `--bary-fallback` alone read the positive smooth `f32` values directly. Re-running the
2324same `198` shaders with `--bary-fallback --f16-interp-fallback` gave `153` OK on both (`141` `v_interp_*_f16` + all
2325`12` raw-bary GS), `0` differing, `0` NaN/zero mismatch, `12` failures on both, and `33` timeouts, with `153/153`
2326completing draws (`89` non-clear exact + `64` clear-only exact across `573/573` targets) bit-for-bit identical under
2327`ps_sweep.py compare --exact`. All `3` whole-corpus shaders combining raw barycentrics and `v_interp_*_f16` also draw
2328bit-for-bit identically (`3/3` draws, `11/11` targets) against `default` on the RX 6650 XT.
2311 2329
2312## Coverage plan and cost 2330## Coverage plan and cost
2313 2331