diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-22 17:57:00 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-22 17:57:00 -0500 |
| commit | ef3fe9ff140797c3b34d307a6bf32cbc5e154eec (patch) | |
| tree | a097e853afb32ef1a04f0c77317f829de753d92d /docs | |
| parent | 59069d04978726770b0d27d2af2ac6216832122f (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')
| -rw-r--r-- | docs/shader_validation.md | 29 | ||||
| -rw-r--r-- | docs/testing.md | 2 |
2 files changed, 19 insertions, 12 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) |
diff --git a/docs/testing.md b/docs/testing.md index 0a240e7ef..6fdcbb99f 100644 --- a/docs/testing.md +++ b/docs/testing.md | |||
| @@ -409,7 +409,7 @@ The GPU tools of `runtime/test/shaders` (`vk_compute_test`, `vk_harness`, ...) r | |||
| 409 | | `vulkaninfo` lists `Microsoft Direct3D12 (<gpu>)` next to the real GPU and the tests run on it | The Windows "OpenCL™, OpenGL® and Vulkan® Compatibility Pack" installs Mesa's Dozen, a Vulkan-on-D3D12 layer that reports `DISCRETE_GPU` like the native card | Current `main` prefers a native ICD over Microsoft's vendor (`0x1414`) in the runtime and every harness; set `LEONIDA_VK_DEVICE=<part of the real GPU name>` to select explicitly. See #915. | | 409 | | `vulkaninfo` lists `Microsoft Direct3D12 (<gpu>)` next to the real GPU and the tests run on it | The Windows "OpenCL™, OpenGL® and Vulkan® Compatibility Pack" installs Mesa's Dozen, a Vulkan-on-D3D12 layer that reports `DISCRETE_GPU` like the native card | Current `main` prefers a native ICD over Microsoft's vendor (`0x1414`) in the runtime and every harness; set `LEONIDA_VK_DEVICE=<part of the real GPU name>` to select explicitly. See #915. | |
| 410 | | A GPU test that uses `image_load` (or lighting built from real shaders) reads zeros from its image; @Silliana saw every texel except pixel (0,0) come back zero in their own layer (#603, not reproduced here) | In this runtime the shader turns the T# words into an index through the descriptor hash table (`runtime/src/descriptor_table.h`: a miss gives index 0), and index 0 is a 1×1 image of zeros (`runtime/src/vulkan_bindless.h`), so a hand-built or zeroed T# that was never registered reads zeros even at (0,0). The translator does not compare coordinates with the T# size, and `cs_imgload.asm` only uses its T# words as a hash key | Register the descriptor through the runtime (for D3D12, create it with `CreateShaderResourceView`) so its T# hits the table, with the image's real width and height (stored as size − 1, see `runtime/src/gfx10_descriptors.h`) | | 410 | | A GPU test that uses `image_load` (or lighting built from real shaders) reads zeros from its image; @Silliana saw every texel except pixel (0,0) come back zero in their own layer (#603, not reproduced here) | In this runtime the shader turns the T# words into an index through the descriptor hash table (`runtime/src/descriptor_table.h`: a miss gives index 0), and index 0 is a 1×1 image of zeros (`runtime/src/vulkan_bindless.h`), so a hand-built or zeroed T# that was never registered reads zeros even at (0,0). The translator does not compare coordinates with the T# size, and `cs_imgload.asm` only uses its T# words as a hash key | Register the descriptor through the runtime (for D3D12, create it with `CreateShaderResourceView`) so its T# hits the table, with the image's real width and height (stored as size − 1, see `runtime/src/gfx10_descriptors.h`) | |
| 411 | | `cs_sample_lz_int_d16`, `ps_sample_implicit_sint`, `ps_ssharp`, `ps_tex`, `ps_texture_mip0`, `ps_texture_sample` and `ps_texture_sample_d16` crash (exit -11 or 139) on an Intel GPU on Linux, while NVIDIA and llvmpipe pass them (TEST-399) | A bug in Mesa ANV's shader compiler: compiling these texture-sampling shaders, `nir_opt_gcm` (`nir_opt_gcm.c:430`, `gcm_schedule_early_src`) dereferences a phi source an earlier pass has freed. The SPIR-V passes `spirv-val`. Seen with Mesa 26.1.6 (Arrow Lake) and 26.2.7 (Iris Xe, ADL GT2); Mesa 26.3.1 and `main` (bb98606) pass the whole suite on the same Iris Xe | Use Mesa 26.3.1 or newer. To check a newer Mesa without installing it, build its Intel Vulkan driver and point `VK_DRIVER_FILES` at its `src/intel/vulkan/intel_devenv_icd.x86_64.json` | | 411 | | `cs_sample_lz_int_d16`, `ps_sample_implicit_sint`, `ps_ssharp`, `ps_tex`, `ps_texture_mip0`, `ps_texture_sample` and `ps_texture_sample_d16` crash (exit -11 or 139) on an Intel GPU on Linux, while NVIDIA and llvmpipe pass them (TEST-399) | A bug in Mesa ANV's shader compiler: compiling these texture-sampling shaders, `nir_opt_gcm` (`nir_opt_gcm.c:430`, `gcm_schedule_early_src`) dereferences a phi source an earlier pass has freed. The SPIR-V passes `spirv-val`. Seen with Mesa 26.1.6 (Arrow Lake) and 26.2.7 (Iris Xe, ADL GT2); Mesa 26.3.1 and `main` (bb98606) pass the whole suite on the same Iris Xe | Use Mesa 26.3.1 or newer. To check a newer Mesa without installing it, build its Intel Vulkan driver and point `VK_DRIVER_FILES` at its `src/intel/vulkan/intel_devenv_icd.x86_64.json` | |
| 412 | | On an AMD integrated GPU (gfx1036) with AMD's Windows driver (`32.0.21042.62` and `32.0.21045.16010` measured), `crosslane_fuzz.py --wave 64 --w64-native --dpp --no-maskdata --seed 82001 --programs 600` reports one native mismatch: `cs_xl64_8200346406` differs in 96 words of `v5`, while `--wave64-emulate` and the hardware oracle match | The driver's shader compiler, not the translator (SHADER-705). The same native wave64 SPIR-V is exact on the same chip and on an RX 7900 XTX under RADV (Mesa 26.3.1), and in the CPU interpreter. The wrong instruction is a `v_permlanex16_b32` that reads a register a DPP op with a partial `row_mask` has just written ([shader_validation.md](shader_validation.md), FUZZ-7) | Translate with `--wave64-emulate on` for that driver: it matches there. `--wave64-emulate auto` picks native wave64 on these 64-wide devices | | 412 | | On an AMD integrated GPU (gfx1036) with AMD's Windows driver (`32.0.21042.62` and `32.0.21045.16010` measured), `crosslane_fuzz.py --wave 64 --w64-native --dpp --no-maskdata --seed 82001 --programs 600` reports one native mismatch: `cs_xl64_8200346406` differs in 96 words (32 lanes of each of its three waves), while `--wave64-emulate` and the hardware oracle match | AMD's Windows driver, not the translator (SHADER-705; the driver's generated code was not inspected). The same native wave64 SPIR-V is exact under RADV (Mesa 26.3.1) on another gfx1036 and on an RX 7900 XTX, and in the CPU interpreter. The wrong instruction is a `v_permlanex16_b32` that reads a register a DPP op with a partial `row_mask` has just written ([shader_validation.md](shader_validation.md), FUZZ-7) | Nothing to change in a build: no shader of the game has that shape (0 of 26,503; the two instructions meet in 6 shaders, all wave32 compute). `--wave64-emulate auto` stays native on this driver because of #857, and the emulated translation of the program matches there | |
| 413 | 413 | ||
| 414 | ## Posting your result | 414 | ## Posting your result |
| 415 | 415 | ||