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:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-22 17:57:00 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-22 17:57:00 -0500
commitef3fe9ff140797c3b34d307a6bf32cbc5e154eec (patch)
treea097e853afb32ef1a04f0c77317f829de753d92d /docs/shader_validation.md
parent59069d04978726770b0d27d2af2ac6216832122f (diff)
Docs: the SHADER-705 note names the gfx1036 that ran under RADV and counts the failing shape in the corpus
The first version said "the same chip": the RADV runs are on another gfx1036 (a Ryzen 9 7950X3D's), where the two Windows reports are a Ryzen 7 9700X's and one more. The 96 wrong words are lanes 32-63 of each wave on 32.0.21045.16010 and lanes 0-15 and 32-47 on 32.0.21042.62. Added, measured here: - the reported program and its 12-instruction reduction are exact natively under RADV as 192 threads and as one 64-thread group, with the driver's default subgroup size and with vk_compute_test --require-wave64 (the fuzzer's native run does not request a subgroup size, so the Windows driver with --require-wave64 is listed as not checked); - over the 26,503 shaders of the game, 2,293 use v_permlanex16_b32 and 27 a DPP op with a partial row_mask; 6 have both, all wave32 compute, and in none does the shuffle read a register such a DPP op wrote last. The "what to do" cell no longer recommends --wave64-emulate on: auto stays native on AMD's Windows driver for RDNA1/2 because that driver can crash on emulated LDS code (#857). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'docs/shader_validation.md')
-rw-r--r--docs/shader_validation.md29
1 files changed, 18 insertions, 11 deletions
diff --git a/docs/shader_validation.md b/docs/shader_validation.md
index 2846f5915..9e1212bbd 100644
--- a/docs/shader_validation.md
+++ b/docs/shader_validation.md
@@ -1021,18 +1021,25 @@ First results on an RTX 4090 (subgroup 32, driver 621.14):
1021 DPP16 ignored `fi:1`. Each was confirmed with a hand-written program. 1021 DPP16 ignored `fi:1`. Each was confirmed with a hand-written program.
1022- **Everything else matches.** On `main`, 1,000 programs (`--seed 8 --ops 28 --no-maskdata --no-w32-hi-lanes`, 500 wave32 native and 500 wave64 emulated) give 0 mismatches. 297 of them are `hyp_only` (permlane with FI = 0 and an inactive source), and with `--permlane-fetch-inactive` all 1,000 match. Native wave64 on the 32-wide card mismatches as documented: `s_bcnt1` of EXEC counts one half, and a `v_readlane` from the other half wraps. 1022- **Everything else matches.** On `main`, 1,000 programs (`--seed 8 --ops 28 --no-maskdata --no-w32-hi-lanes`, 500 wave32 native and 500 wave64 emulated) give 0 mismatches. 297 of them are `hyp_only` (permlane with FI = 0 and an inactive source), and with `--permlane-fetch-inactive` all 1,000 match. Native wave64 on the 32-wide card mismatches as documented: `s_bcnt1` of EXEC counts one half, and a `v_readlane` from the other half wraps.
1023- **Native wave64 on a 64-wide device: one driver fault (SHADER-705).** With `--wave 64 --w64-native --dpp --no-maskdata 1023- **Native wave64 on a 64-wide device: one driver fault (SHADER-705).** With `--wave 64 --w64-native --dpp --no-maskdata
1024 --seed 82001 --programs 600`, AMD's Windows driver on a gfx1036 integrated GPU (`32.0.21042.62` and 1024 --seed 82001 --programs 600`, AMD's Windows driver on a gfx1036 integrated GPU (`32.0.21045.16010` and
1025 `32.0.21045.16010`, two machines; found by @Vonsek, reduced by @zzEmmazz) gives one native mismatch: 1025 `32.0.21042.62`, two machines; found by @Vonsek, reduced by @zzEmmazz) gives one native mismatch:
1026 `cs_xl64_8200346406` (index 403) differs in 96 words of `v5`, and the emulated build matches there. 1026 `cs_xl64_8200346406` (index 403) differs in 96 words, lanes 32-63 of each wave on the first driver and lanes 0-15
1027 - **The same run under RADV** (Mesa 26.3.1, Linux) on the same chip and on an RX 7900 XTX: 454 match, 0 mismatch, 1027 and 32-47 on the second. The emulated build matches there.
1028 146 `hyp_only`, natively and emulated. The program alone, and the 12 instructions it was reduced to, give 0 of 1028 - **The same run under RADV** (Mesa 26.3.1, Linux) on another gfx1036 (a Ryzen 9 7950X3D's) and on an RX 7900 XTX:
1029 2,688 words off natively on both devices. 1029 454 match, 0 mismatch, 146 `hyp_only`, natively and emulated. The program alone, and the 12 instructions it was
1030 reduced to, are exact natively on both devices: as 192 threads and as one 64-thread group, with the driver's
1031 default subgroup size and with `vk_compute_test --require-wave64`.
1030 - **Hardware:** `--oracle hw` on that gfx1036 matches the model in all 600 programs. 1032 - **Hardware:** `--oracle hw` on that gfx1036 matches the model in all 600 programs.
1031 - **So the native wave64 SPIR-V is right and that driver's compiler is not.** The wrong instruction is a 1033 - **So the native wave64 SPIR-V is right and that driver is not.** The wrong instruction is a `v_permlanex16_b32`
1032 `v_permlanex16_b32` that reads a register a DPP op with a partial `row_mask` has just written; equivalent 1034 that reads a register a DPP op with a partial `row_mask` has just written; equivalent rewrites of the shuffle
1033 rewrites of the shuffle index only move the wrong lanes. 1035 index only move the wrong lanes (@zzEmmazz).
1034 - **Not checked:** the driver's generated code, and AMD's Windows driver on RDNA3 or newer. 1036 - **In the game's shaders that shape does not occur.** Of 26,503, 2,293 use `v_permlanex16_b32` and 27 a DPP op with
1035 - **On that driver** translate with `--wave64-emulate on`; `auto` picks native wave64 on a 64-wide device. 1037 a partial `row_mask`. 6 have both, all wave32 compute, and in none does the shuffle read a register that such a
1038 DPP op wrote last (program order, branches ignored).
1039 - **Not checked:** the driver's generated code, so the fault is not located and other shapes may trigger it; the
1040 Windows driver with `--require-wave64` (the fuzzer's native run does not request a subgroup size); AMD's
1041 Windows driver on RDNA3 or newer.
1042 - `--wave64-emulate auto` stays native on that driver, because it can crash on emulated LDS code (#857).
1036- **Closed question (#374):** what hardware does for permlane with FI = 0 was measured on RDNA2 and RDNA3.5 (see above). 1043- **Closed question (#374):** what hardware does for permlane with FI = 0 was measured on RDNA2 and RDNA3.5 (see above).
1037 1044
1038### 32-bit float VALU on the GPU (`tools/f32_fuzz.py`, FUZZ-3) 1045### 32-bit float VALU on the GPU (`tools/f32_fuzz.py`, FUZZ-3)