Repository navigation
D3D12.X: XCL_RT_LEAVE_OUT leaves out named compute programs while rays cannot hit - #3026
Open
VolenNakov wants to merge 1 commit into
Open
VolenNakov wants to merge 1 commit into
VolenNakov wants to merge 1 commit into
Conversation
…s cannot hit Port of Vice-Tay's ray-tracing leave-out (crates/victory-gpu/src/pipeline/make.rs, `left_out`, commit 1f69d67; added in codec_d's 8cc31ab), GPL-3.0-or-later. The programs are named by the user's fragments (XCL_RT_LEAVE_OUT), not by names in the source. A watch of the acceleration structures the title's views name warns once when one gets a root node. The shader preparation and --precompile pass the programs over. Part of xcl-dev#3011 (C3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@VolenNakov Thanks for carrying the attribution over. The opt-in name matching fits the experiment. Since the title builder can become active during a run, the structure check is important; keep testing the point where a valid root first appears and how that changes the skip decision. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3011 (C3). Ports Vice-Tay's ray-tracing leave-out: while a title builds no acceleration structure, its ray hit-shading and ray-start compute programs have nothing to do, so they are not translated, compiled or dispatched. Off by default.
XCL_RT_LEAVE_OUT=<fragment>[,<fragment>…]: a console compute program whose shader container holds one of the fragments (at least 6 bytes each) gets the dummy program that an untranslatable console shader already gets, so its dispatches are skipped. The shader preparation andxcl shaders --precompilepass it over. The fragments come from the user; XCL's source names no title's programs. The program names are in the containers' debug data:xcl rpf <pack> --find <name>lists them.Why it is safe to leave them out, and how XCL notices when it no longer is: XCL keeps the acceleration structures the title's views name (
D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTUREin unified memory). Every 300 frames it checks their headers. When one gets a root node (header dword0x30, asgpu/bvh.rsreads it), it warns once that rays can hit now and that the setting should come off for this title. Unlike VIctory, XCL runs the title's own structure builder (XboxBvhBuilder.dll), so this is a real check and not a formality.What is in it (one commit, +224 / −2, about half of it the new module and its tests)
gpu/rt_leave_out.rs(new): the fragments, the match, the counters and the structure watch, with the provenance header. Tests:fragments_are_trimmed_and_short_ones_dropped;a_container_is_matched_by_any_fragment_anywhere;a_header_without_a_root_has_none;a_built_structure_from_the_builder_has_a_root: the watch reads the root that XCL's own BVH builder writes.hle/d3d12x/real.rs:dev_create_compute_psotakes the existing failed-console-shader path for a program left out (dummy program,note_console_compute), without the fallback warning. The acceleration-structure SRV path notes the structure.hle/d3d12x/present.rs: the check, next to the 300-frame rate line.shaders.rs: the preparation / precompile loop passes the programs over and prints how many.README.md: the switch.THIRD_PARTY.md: the Vice-Tay entry.Upstream and credit: Vice-Tay (https://github.com/TaynanGT/Vice-Tay, GPL-3.0-or-later)
1f69d67,crates/victory-gpu/src/pipeline/make.rs,left_out(VICTORY_RT_RESOLVE,VICTORY_ACTIVATE_RAYS,VICTORY_BVH_BUILDER), added there in codec_d's8cc31ab. Thanks to codec_d and @TaynanGT, and to @throny for the candidate list. Changes from upstream:Tested
cargo test -p xcl --libon this branch (onmain06f90c19), release: 1,334 passed, 0 failed, 27 ignored; the 4 new tests among them.ea3b5e4d, Series X profile) on an RTX 4060 Ti 16 GB (driver 610.88, no Resizable BAR), i7-8700, 32 GB RAM, Windows 11 26200. Tree:main08db802+ D3D12.X: compute pipelines not used for a while are released on NVIDIA #2526, Recompiler: split wave64 compute groups of several waves across dispatches #2097, D3D12.X: an ExecuteIndirect of a split program runs its pieces #2404, xcl run:xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590, D3D12.X: a bind never builds a cold pipeline on the title's thread #2615, Console CPU instructions: monitorx / mwaitx are rewritten in place at their first fault #2618 (+ voiceovarian1-max'se9f4c457), D3D12.X: title texture reads outside the coherent window use the safe copy #751, D3D12.X: a 3-D texture XG cannot size is taken at its texels' bytes #2753, D3D12.X: zero recycled vram::Pages tiles before reuse #2759, Shaders: xcl pipelines compiles a run's queued pipelines outside the title #759 / Shaders: xcl pipelines --shard k/n splits the journal over processes #1826, D3D12.X: UMA windows in a driver heap on NVIDIA, 4.9x FPS (0.62 -> 3.03) #2844, D3D12.X: XCL_WATCH_TRAP=1 leaves memory nobody writes out of the write-watch looks (off by default) #2934, D3D12.X: a view's padding does not make a second texture #2762, with this commit cherry-picked. OnlyREADME.md/THIRD_PARTY.mdconflicted, against that tree's older docs.XCL_NETWORK=0 XCL_DIRECT_DXIL=all XCL_TEXTURE_LEVEL_PAGES=1 XCL_SPLIT_INDIRECT_ROUNDS=2 XCL_DIRECT_SPLIT_INSTRUCTIONS=0 XCL_WATCH_TRAP=1, 2 GiB shader heap (xcl run:xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590), warm caches, 900 s, A pressed from 6 to 300 s.The gate first (a local probe, not in this PR, logging the structures the views name every 300 frames, 900 s): the title names 5 acceleration structures from about 170 s in the world. None ever has a root node, so every ray misses. One disassembled hit-shading program contains no
image_bvh*_intersect_ray: these programs shade hits that tracing programs found; they do not trace.A/B, back to back, nobody at the controller, same build, the switch the only difference:
nvidia-smievery 5 s, 200–880 s)Not tested
mainalone in the title (the game runs used the tree above).AI use: Claude Code (Claude Opus 5.5) read Vice-Tay and XCL, wrote the port, its tests and this description, and ran the runs on my machine. I chose the claim and reviewed the result.
🤖 Generated with Claude Code