xcl run: XCL_RT_LEAVE_OUT leaves out a title's ray-tracing programs #3302

Closed
Foniass wants to merge 1 commit from upstream-pr/3302 into main
Foniass commented 2026-11-29 06:51:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T06:51:14Z.


A title's ray-tracing programs that start rays or shade their hits (on
a retail title about 1,000 programs of ~1 MB of DXIL each, the largest
of its cold driver compiles) do nothing while the title has built no
acceleration structure: every ray misses. On amd-dev's runs, allowing
them pushed the title's commit at world entry from about 10 to 21 GB.

XCL_RT_LEAVE_OUT=[,...] (off by default) leaves out
the compute programs whose shader container holds one of the fragments:
the title's pipeline gets the dummy program an untranslatable console
shader gets, so its dispatches are skipped, and the shader preparation
and xcl shaders --precompile pass them over (and say how many). The
fragments name the programs (names in the container's debug data, found
with xcl rpf <pack> --find); XCL's source names no title's programs.
So that leaving them out stays harmless, XCL watches the acceleration
structures the title's views name and warns once when one gets a root
node.

Ported from amd-dev (raylitebull's WIP 6fa964de, gpu/rt_leave_out.rs as
on amd-dev, and its hooks), itself ported from Vice-Tay
(GPL-3.0-or-later, commit 1f69d67, left_out in
crates/victory-gpu/src/pipeline/make.rs); THIRD_PARTY.md names it.

What is in it

  • crates/xcl/src/gpu/rt_leave_out.rs (new): fragments, left_out, the acceleration-structure watch, tests
  • crates/xcl/src/hle/d3d12x/real.rs: rt_left_out in compute_pso (the dummy program), note_structure where a ray-tracing view is made; present.rs: check_structures every 300 frames
  • crates/xcl/src/shaders.rs: the preparation and --precompile pass left-out programs over and say how many
  • THIRD_PARTY.md: Vice-Tay (GPL-3.0-or-later); README.md: the switch

Tested

  • NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 0ab2fb4d: 2608 passed, 4 failed, 49 ignored (lib: 2469 / 4 / 29 in a rerun, other targets 139 / 0 / 20). The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (E_OUTOFMEMORY from CreateComputePipelineState, seeds 70 / 545 / 1019 / 1507), the same as on main on this machine; they pass on another RTX 5070 Ti. SKIPPED GPU tests: 44 notices, almost all no wave64.
  • The first full run's lib tests stopped with exit code 0x7C10003 after the known UMA mixed-window test failure (the one #3187 moves into a child process; coherent window could not be restored ... E_OUTOFMEMORY); a rerun of cargo test -p xcl --lib on this head: 2469 passed, 4 failed (the fuzz tests), 29 ignored.
  • Retail title: 60 s smoke run below (no device removal or crash, frames and peak commit within the limits).

Regression run

main:

xcl-smoke v1
commit: b10cc4c6766adc947c2054ada4a2af98be15108d
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1565 (PresentX 1565)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16026 MB

this PR:

xcl-smoke v1
commit: 0ab2fb4d03e7f91f9dae314633685a8882b57d27
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1670 (PresentX 1670)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16889 MB

Not tested

  • a run with XCL_RT_LEAVE_OUT set on the retail title (the smoke run is without it, so it only shows the default is unchanged); the memory effect is amd-dev's report, not measured here
  • AMD GPUs

AI use

  • Claude Code with Claude Opus 5.5: ported this part of the amd-dev commit named above to main, wrote the commit message and this description, ran the tests and the smoke run.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5548403609 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3302). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T06:51:14Z. --- A title's ray-tracing programs that start rays or shade their hits (on a retail title about 1,000 programs of ~1 MB of DXIL each, the largest of its cold driver compiles) do nothing while the title has built no acceleration structure: every ray misses. On amd-dev's runs, allowing them pushed the title's commit at world entry from about 10 to 21 GB. XCL_RT_LEAVE_OUT=<fragment>[,<fragment>...] (off by default) leaves out the compute programs whose shader container holds one of the fragments: the title's pipeline gets the dummy program an untranslatable console shader gets, so its dispatches are skipped, and the shader preparation and `xcl shaders --precompile` pass them over (and say how many). The fragments name the programs (names in the container's debug data, found with `xcl rpf <pack> --find`); XCL's source names no title's programs. So that leaving them out stays harmless, XCL watches the acceleration structures the title's views name and warns once when one gets a root node. Ported from amd-dev (raylitebull's WIP 6fa964de, gpu/rt_leave_out.rs as on amd-dev, and its hooks), itself ported from Vice-Tay (GPL-3.0-or-later, commit 1f69d67, `left_out` in crates/victory-gpu/src/pipeline/make.rs); THIRD_PARTY.md names it. **What is in it** - `crates/xcl/src/gpu/rt_leave_out.rs` (new): fragments, `left_out`, the acceleration-structure watch, tests - `crates/xcl/src/hle/d3d12x/real.rs`: `rt_left_out` in `compute_pso` (the dummy program), `note_structure` where a ray-tracing view is made; `present.rs`: `check_structures` every 300 frames - `crates/xcl/src/shaders.rs`: the preparation and `--precompile` pass left-out programs over and say how many - `THIRD_PARTY.md`: Vice-Tay (GPL-3.0-or-later); `README.md`: the switch **Tested** - NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke - `cargo test --workspace --no-fail-fast -- --test-threads=4` on 0ab2fb4d: 2608 passed, 4 failed, 49 ignored (lib: 2469 / 4 / 29 in a rerun, other targets 139 / 0 / 20). The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3` (`E_OUTOFMEMORY` from `CreateComputePipelineState`, seeds 70 / 545 / 1019 / 1507), the same as on main on this machine; they pass on another RTX 5070 Ti. SKIPPED GPU tests: 44 notices, almost all `no wave64`. - The first full run's lib tests stopped with exit code 0x7C10003 after the known UMA mixed-window test failure (the one #3187 moves into a child process; `coherent window could not be restored ... E_OUTOFMEMORY`); a rerun of `cargo test -p xcl --lib` on this head: 2469 passed, 4 failed (the fuzz tests), 29 ignored. - Retail title: 60 s smoke run below (no device removal or crash, frames and peak commit within the limits). **Regression run** main: ``` xcl-smoke v1 commit: b10cc4c6766adc947c2054ada4a2af98be15108d gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1565 (PresentX 1565) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16026 MB ``` this PR: ``` xcl-smoke v1 commit: 0ab2fb4d03e7f91f9dae314633685a8882b57d27 gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1670 (PresentX 1670) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16889 MB ``` **Not tested** - a run with `XCL_RT_LEAVE_OUT` set on the retail title (the smoke run is without it, so it only shows the default is unchanged); the memory effect is amd-dev's report, not measured here - AMD GPUs **AI use** - Claude Code with Claude Opus 5.5: ported this part of the amd-dev commit named above to main, wrote the commit message and this description, ran the tests and the smoke run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Foniass commented 2026-11-29 18:23:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T18:23:18Z.


Note for the maintainers: this PR duplicates #3026 (VolenNakov, opened 2026-11-27, two days before this one). It is the same feature: the same XCL_RT_LEAVE_OUT switch, the same gpu/rt_leave_out.rs, and the same Vice-Tay source (1f69d67, left_out). This one came from the amd-dev copy of it. I missed #3026 when I checked for duplicates.

Only one of the two should be merged. #3026 is older but currently conflicts with main; this one merges cleanly and has a full suite and smoke run on an RTX 5070 Ti. I'll close this PR if you keep #3026.

(Written with Claude Code, Claude Opus 5.5.)

<!-- greyfinch-sync:ivall/xcl:comment:7260442361 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3302#issuecomment-7260442361). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T18:23:18Z. --- Note for the maintainers: this PR duplicates #3026 (VolenNakov, opened 2026-11-27, two days before this one). It is the same feature: the same `XCL_RT_LEAVE_OUT` switch, the same `gpu/rt_leave_out.rs`, and the same Vice-Tay source (`1f69d67`, `left_out`). This one came from the amd-dev copy of it. I missed #3026 when I checked for duplicates. Only one of the two should be merged. #3026 is older but currently conflicts with main; this one merges cleanly and has a full suite and smoke run on an RTX 5070 Ti. I'll close this PR if you keep #3026. (Written with Claude Code, Claude Opus 5.5.)
Foniass commented 2026-11-30 21:45:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-30T21:45:39Z.


Closing in favour of #3026 (VolenNakov). It is the same feature, opened earlier and still kept up to date, with test reports. This PR now conflicts with main too, so it no longer has any advantage over #3026.

(Written with Claude Code, Claude Opus 5.5.)

<!-- greyfinch-sync:ivall/xcl:comment:7292857928 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3302#issuecomment-7292857928). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-30T21:45:39Z. --- Closing in favour of #3026 (VolenNakov). It is the same feature, opened earlier and still kept up to date, with test reports. This PR now conflicts with main too, so it no longer has any advantage over #3026. (Written with Claude Code, Claude Opus 5.5.)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3302
No description provided.