Repository navigation
Conversation
|
Independently verified the shader dump on Windows x64 at 051b86e. With XCL_DUMP_SHADERS=1, I passed two synthetic CS containers through shader::capture. Both used the same three RDNA2 instructions with no EXEC write. I checked the captured binaries against the inputs and read the generated fssm0.p0.hlsl files. Header flags 0x20 produced [WaveSize(32)] and 0x00 produced [WaveSize(64)]. As a negative control, restoring only the previous detect_wave64(code) call made the same test fail: the 0x20 case emitted [WaveSize(64)]. This exercises HLSL export; I did not compile or dispatch the dumped shaders. OpenAI Codex (GPT-6.2 Astra) assisted with verification. |
|
Test run on AMD RDNA4 (native wave64), since the PR's own run is on a wave32-only adapter where the wave64 tests are skipped. Tested: the PR head
A note for anyone repeating that last control: without Not tested: smoke or a retail title, AI use: Claude Code (Claude Opus 5.5) read the diff, ran the tests and the controls on my PC and wrote this comment. I have not reviewed the code. |
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
051b86e to
11f9327
Compare
detect_wave64 tells the wave size from the code: 32-bit EXEC writes and no 64-bit ones mean wave32, anything else wave64. A wave32 program that never writes EXEC has nothing in its code to tell, so it was translated as wave64: its cross-lane reads (v_readfirstlane, v_readlane, permutes) then span 64 threads instead of 32. The FSSM header has the answer: bit 5 of the flags word at +0xD4. Measured on a retail shader pack (26 698 programs): the bit is set for all 2 608 programs the code shows to be wave32 and clear for all 24 036 the code takes for wave64, except 54 compute programs with the bit set and no EXEC write in their code. 27 of those 54 have cross-lane instructions (v_readfirstlane, v_readlane, permutes, LDS). As wave32 all 54 translate completely and compile with DXC. fssm_wave64 takes wave32 from the header and leaves everything else to detect_wave64, so only those programs change. An unused field (0xDEADBEEF) and other FSSM versions say nothing. A compute program through the PSO hook (gpu_compute_e2e) shows the effect: 64 threads store v_readfirstlane of their thread id; with the flag threads 32..63 read thread 32, without it they read thread 0. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the header `xcl shaders --recomp` counted and translated a program as wave32 or wave64 from its code alone (detect_wave64), and so did the per-shader HLSL dump (`XCL_DUMP_SHADERS`). A wave32 program without an EXEC write was counted and translated as wave64 there, while the pipelines translate it as wave32 by the FSSM header's flag (fssm_wave64). Both now use fssm_wave64, so the statistics describe what the pipelines build. Suggested in the review of the header-flag change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
11f9327 to
6576d75
Compare
Stacked on #573; only the top commit (
6576d75) belongs here.xcl shaders --recompand the per-shader dump (XCL_DUMP_SHADERS) told a program's wave size from its code alone (detect_wave64). After #573 the pipelines take wave32 from the FSSM header's flag, so a wave32 program without an EXEC write was still counted and translated as wave64 by these two tools. Both now usefssm_wave64, so the statistics describe what the pipelines build. MesshM suggested it in the review of #573. No issue covers it; no other open PR touches these call sites.What is in it
crates/xcl/src/shaders.rs:RecompAgg::addgets the wave size from its caller, which has the FSSM (recomp::fssm_wave64(f, code)); the testrecompiler_statistics_count_wave32_by_the_header_flag.crates/xcl/src/gpu/shader.rs: the dump'srecompileusesfssm_wave64.Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); tests in debug, title runs in release.cargo build --workspace && cargo test --workspace -- --test-threads=4on6576d75(on Recompiler: the FSSM header's wave32 flag decides a program's wave size #573b8b4135,mainbdda528): 1 130 passed, 0 failed, 46 ignored, first run (one more than Recompiler: the FSSM header's wave32 flag decides a program's wave size #573 on the samemain: this PR's test).XCL_SAMPLE_*unset.SKIPPEDon this adapter: the wave64 GPU tests (no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(the driver cache cannot be disabled without Developer Mode).xcl shaders <pack> --recompon a retail shader pack (26 698 programs; counts only):main1ec4c98reports wave32 2 608, this PR 2 662 – the 54 compute programs Recompiler: the FSSM header's wave32 flag decides a program's wave size #573 describes. Both translate 26 698 of 26 698 with 0 errors; the VS / PS wave size line is the same in both (wave32 1 127, wave64 13 210).detect_wave64(code)again, the new test fails (left: (1, 0),right: (1, 1)).Regression run
scripts/smoke.ps1, a retail title, release builds, warm shader cache,mainfirst. The change is not reached by a title run (it is inxcl shadersand the dump).main:
PR:
Not tested
XCL_DUMP_SHADERS): no test covers it; the change there is the same one-line call.AI use
🤖 Generated with Claude Code