Repository navigation
Conversation
An ignored test for compile-time work (xcl-dev#1269): each record named by its offset in XCL_SAMPLE_RPF (XCL_RECORDS) is translated and compiled the way a title gets it (split wave64 on 32-lane GPUs, XCL_RECOMP_WINDOWS), and then created as a compute pipeline. It prints the translation + DXC time, the DXIL size and the driver's CreateComputePipelineState time. `xcl shaders --compile` cannot measure the driver: its HLSL is not the split form, and NVIDIA refuses [WaveSize(64)]. Run it with XCL_DXIL_CACHE set to an empty folder and XCL_TRANSLATED_CACHE=0. The driver keeps its own disk cache, so only DXIL it has not seen gives a real time. On RTX 2070 SUPER the slowest RT resolve program (0xd73cab0) takes 9.1 s in DXC and 8.5 s in the driver. Refs xcl-dev#1269 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verified PR #1529 at head commit Environment
Tested
Code review
Not tested
AI use
|
|
Independent AMD run and lifetime-marker comparison on Tested
Not tested Retail shaders, retail title runs, and compile or driver timings. The GPU comparison checks one synthetic shader. AI use OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the checks, and drafted this report. |
With HLSL 2021 and SM 6.6, DXC puts a lifetime.start / lifetime.end pair around every local. They only tell the optimiser that a local is undefined where its scope starts. Without them (-disable-lifetime-markers) the local holds its last value there, which is one of the values "undefined" allowed, so no program changes meaning. A caller's own -enable-lifetime-markers still wins. The DXC arguments are built in arguments() now, so a test can check them. Measured on a retail pack, DXC 1.9.2602.17, RTX 2070 SUPER, Ryzen 7 5800X3D: - seeded sample of 63 programs (retail_translation_survey, seed 1269, in-process DXC, main and this commit run alternately, two rounds): total 62 / 61 s -> 58 / 58 s (-5.7 %), median 0.24-0.25 -> 0.23-0.24 s, p90 2.61-2.68 -> 2.39-2.40 s, max 9.5-9.6 -> 9.0-9.1 s - 130 random programs, dxc.exe: 141.2 -> 133.1 s (-5.7 %), DXIL -0.6 % - 5 heavy compute programs as a title compiles them (retail_pipeline_cost): DXC -4 to -16 %; driver -6 to -10 %, one +2 % Cached DXIL from before stays valid (the key has no flags), so nothing has to be thrown away. Refs xcl-dev#1269 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e06ffce to
3386385
Compare
|
Tested on AMD Radeon RX 7800 XT with driver Both revisions built successfully with
The native wave64 compute and mesh shader cases and XCL’s synthetic end-to-end title test passed on both revisions. The separate Not tested: Retail game files or shader packs, compile-time speedup, driver pipeline build times, or in-game loading. All AI use: Codex (GPT-6) ran the tests on the hardware above and drafted this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Ran on the PR's head (3386385): RTX 5070 Laptop (Blackwell, driver 616.87), cargo build --workspace: ok One sequencing question: this keeps the >8 MB -O0 band while #1526 removes it — Not tested: the 5.7 % compile-time claim itself (no retail pack here), and no |
|
Hardware: AMD Radeon RX 7900 XTX (driver 32.0.32029.2010), Ryzen 9 7950X3D, 32 GB, Windows 11 Pro 10.0.26300, rustc 1.100.0; tests in debug, timings in release. DXC 1.8.2505.32 (Windows SDK 10.0.28000.0). Tested (AMD)
Not tested
AI use
|
|
I am not going to follow this PR up any further. Maintainers can edit the branch, take it over or close it. On the open question about #1526: the two PRs change the same threshold block in |
DXC now gets
-disable-lifetime-markersfor every recompiled program. With HLSL 2021 and SM 6.6 it wraps every local in alifetime.start/lifetime.endpair. The pair only tells the optimiser that the local is undefined where its scope starts. Without it, the local keeps its last value there, which is one of the values "undefined" already allowed, so no program changes meaning. Programs compile about 6 % faster and their DXIL is 0.6 % smaller. A caller that passes-enable-lifetime-markers(or its own-O) still wins.Refs #1269
What is in it
Tests: retail_pipeline_cost times DXC and the driver per program(crates/xcl/src/gpu/recomp/tests.rs): an ignored test that translates retail records (picked by offset) the way a title gets them, including the split wave64 form, and creates them as compute pipelines. It prints the translation + DXC time, the DXIL size and the driver time.xcl shaders --compilecannot measure the driver: its HLSL is not the split form, and NVIDIA refuses[WaveSize(64)].Recompiler: DXC compiles without lifetime markers(crates/xcl/src/gpu/recomp/dxc.rs): the arguments are now built inarguments(), which adds the flag. Two tests: the exact arguments per size and caller overrides, and a compile with real DXC.Tested
NVIDIA GeForce RTX 2070 SUPER (driver 621.35), Ryzen 7 5800X3D, 32 GB, Windows 10.0.26300.9974, rustc 1.100.0, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)
cargo build --workspace && cargo test --workspace -- --test-threads=4(debug,XCL_SAMPLE_RPFset): 772 passed, 0 failed, 42 ignoredSKIPPED:
gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Compile time on a retail
shaders.rpf, before → after:retail_translation_survey, seed 1269, 63 programs, DXC in process (release),b7aa9f3and this PR run alternately, two rounds; totaldxc.exeretail_pipeline_cost), DXCCreateComputePipelineState, DXIL the driver had not seen)The first version of this description gave 71 s → 64 / 65 s for the sample. The 71 s was measured on an older
main, so it was replaced by the alternating runs above.Regression run
Both runs used an empty
XCL_DXIL_CACHEandXCL_TRANSLATED_CACHE=0. Order: main, this PR, main again, and this PR again after the commit message was corrected (same tree). The blocks are the second main run and the last run. The first main run, made while the game files were not yet in the OS file cache, showed 454 frames (same exit, no removals or crashes, peak commit 15737 MB).Not tested
AI use
🤖 Generated with Claude Code