Repository navigation
Conversation
Only emit HLSL prelude helpers (bvh_intersect, FMT_INFO, st_bytes, dst_sel, ld_raw) and memory accessor switches (xcl_mLoad*, xcl_mStore*, atomics, xcl_loadx4) when actually referenced by the translated shader body. This trims dead code from emitted HLSL and lowers DXC compile time on shaders with single or multiple memory windows.
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X Radeon iGPU (gfx1036 RDNA2, native wave64) + RTX 3060 Ti; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
Test report on AMD wave64 hardware (RX 6900 XT, RDNA2): no new failures, and the wave64 GPU tests that were SKIPPED on the RTX 3060 run and pass here. Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) fetched the branch, ran the suites and wrote this report; the runs are real, on the hardware above. |
|
Synthetic DXC comparison on Windows 11, Ryzen 7 9800X3D, Rust 1.99.1 MSVC release, DXC 1.8.2502.11. I compared 4dfed79 with its actual parent 67a3735, using the same scratch harness for both. The workspace build and stock pruning test passed. The harness compiled 36 This measures small synthetic compute shaders only. AI-assisted. Codex (GPT-6) wrote and ran the scratch harness. |
Hardware test report — commit
|
|
Tested RTX 5080 (driver 32.0.16.2101), Ryzen 9 9900X3D, Windows 11 build 26300, Rust 1.100.0 MSVC release, DXC 1.8.2502.11. Compared the clean PR head with its exact parent. From a retail shader pack, sampled complete translations by name hash (1 in 50, four memory windows), then used seed 1043 to select 20 VS and 20 PS from those with baseline HLSL at or below 128 KiB. Three interleaved cold DXC CLI rounds at Regression run Exact parent PR head Head reached 62.7% of the parent's frames and failed our 80% comparison threshold. The overlapping benchmark and single smoke run per build prevent attributing the lower frame count to the patch. Not tested Isolated smoke repeats, current AI use Codex (GPT-6.2-Sol) ran and analyzed the measurements and drafted this report. |
|
Smoke runs for this PR's head Tested
main: PR: The PR reached 83.4 % of Not tested
AI use
|
|
Test report for #1043 on NVIDIA Windows. The suite passes. On a random retail sample, compile time does not change. Tested
The pruned helpers are cheap for DXC: an unused function costs it little. The HLSL is shorter, but compile time does not change. With Not tested
Measured and written with Claude Code (Claude Opus 5.5). |
|
Smoke blocks for this PR, as asked in the description. Same title, same 60 s, RTX 2070 SUPER (621.35), Windows 10.0.26300. Both runs used a clean checkout, an empty This PR: 99 % of main's frames, 100.6 % of its peak commit, no device removal or crash. Run by Claude Code (Claude Opus 5.5). |
|
Nothing has happened on this PR for 3 days, so it is marked |
|
#2827 solves the same problem in another way. It keeps only the AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Prune unreferenced HLSL prelude helpers (
bvh_intersect,FMT_INFO,st_bytes,dst_sel,ld_raw) and memory accessors (xcl_loadx4,xcl_mStore*,xcl_mInterlocked*) when translating shaders.Previously,
PRELUDE_MEMand the entiremem_accessorsswitch-case ladder were emitted unconditionally, bloating the emitted HLSL and increasing DXC compile times for shaders that only perform simple loads or do not use raytracing BVH or packed buffer formatting.What is in it
crates/xcl/src/gpu/recomp/emit.rs: conditionally emit HLSL prelude helpers and memory accessors based on shader body usage.crates/xcl/src/gpu/recomp/tests.rs: addunreferenced_helpers_and_accessors_are_prunedunit test verifying that unreferenced helpers and accessors are omitted from emitted HLSL and that resulting shaders compile cleanly with DXC.Tested
cargo test --workspace -- --test-threads=4: 736 passed, 0 failed, 41 ignored.gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64unreferenced_helpers_and_accessors_are_prunedwith DXC compilation.Regression run
We have no retail title; this changes
crates/xcl/src/gpu/recomp/emit.rs, so it needs one. Could someone with a title post thexcl-smokeblocks formainand this head?main:
PR:
Not tested
AI use