xcl run: xcl replay translates the shaders of a capture again #2423
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2433"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by madaraXor on 2026-11-25T18:38:12Z.
xcl replay <capture folder>reads a capture written byXCL_CAPTURE_DRAWand translates and compiles its console shaders again with this build's translator. The call itself is run by the next PR; this part needs no GPU and shows what a translator change does to a captured shader. Part of #675.Stacked on #2432; only the top commit belongs here.
What is in it
replay.rs: options, the manifest,translate(the memory windows and the split flag of the capture run come from the manifest; static samplers numbered across stages as in a pipeline), the HLSL written to<capture>\replay_<name>\.main.rs,lib.rs: the command and its help.xbox::tests; no title's data) translates and compiles; options.--outis one plain name (no way out of the capture folder); a capture with a GS (the capture writes the rect-list stand-in) is refused up front, before anything is written (replayable). Tests:options_parse,a_capture_with_a_gs_is_refused.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4ond0bad53: 1437 passed, 5 failed, 46 ignored. The failures:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 540),hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory(#650) and the e2e teststest_title_runs_and_game_folder_is_untouched,test_title_draws_with_a_root_signature_under_the_debug_layerandtest_title_runs_under_the_debug_layer_with_dred, which fail onmaine1d84b7on this machine too (its whole suite: 1416 passed, 7 failed, 46 ignored). SKIPPED: the six per-lane cases off16_programs_on_the_gpu/f32_programs_on_the_gpu(refused),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Regression run
scripts/smoke.ps1, 60 s, release builds, the same title on the same day.main:
PR:
Not tested
XCL_DIRECT_DXIL): the replay uses the HLSL path.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T19:46:21Z.
gpu_suite (cold cache): 160 passed / 4 failed, no crashes. Three are the known baseline trio on this lane; the fourth isgpu_promoted_uav_clear_values_pass_create_committed_resource, newly red on main since #2280 (report), unrelated to this PR.Targeted run of
a_capture_s_shaders_translate_and_compile: passed.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T19:54:39Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:53:05Z.
Review: COMMENTED
Not merge-ready. Capture producer records GS, but replay translation accepts only VS/PS/CS and errors on GS, so a successfully captured geometry draw cannot replay. Add GS support or clearly reject/document unsupported capture types with tests. Also --out is directly joined into replay_; components such as x/../../outside can escape the capture directory. Restrict it to a single normal component or canonicalize/verify containment; constrain manifest shader file paths too. Current Windows Build/test fails.
Imported from ivall/xcl. Originally posted by madaraXor on 2026-11-25T23:43:55Z.
Thanks, fixed in the force-pushed commit:
xcl replaynow refuses such a capture up front (replayable), with "the capture has a gs shader: xcl replay runs draws with a VS and PS, or dispatches", before anything is translated or written. The module doc says so. Test:a_capture_with_a_gs_is_refused.--out: it must be one plain name (plain_name), sox/../../outside,..,a\b,C:\xand/xare usage errors. Test:options_parse.Manifest::check, so nothing outside the capture folder is read.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:12:28Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:03:50Z.
Triage (#1607) – head
d0bad53This PR is stacked on #2432; only the top commit (
replay.rs, thexcl replaycommand) belongs here. #2434 and #2435 continue the same stack, and no other PR adds a replay command.One problem in
replay.rs:translate:windows = (m.mem_windows & 0xFF).max(1)dropsHEAP_WINDOWS/HEAP_FLAT. A capture from anXCL_HEAP_WINDOWS=1run is therefore translated in the switch form, and with 8 or 16 windows that form cannot represent the count. The description says the capture run's windows come from the manifest, so the flags should be passed through.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.