xcl run: xcl replay runs one captured call alone #2434
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2434
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2434"
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?
@madaraXor on GitHub · 2026-11-25 18:38 UTC · original
madaraXor:replay-run→main· +2985 −1 · 15 files · 6 commits · openxcl replaynow runs the captured draw or dispatch alone on a device of its own and reads back what it wrote: the GPU time, and each target, the depth buffer and each UAV texture as raw texels and a PNG. Part of #675.The GPU part runs in a child process with a timeout: a call that hangs the GPU ends as
timed outordevice removed after N msin the child, not in the caller.Over 400 lines:
replay/gpu.rsis one function's worth of device state (windows, textures, views, targets, the call, the read-back). A part of it cannot draw, and so cannot be tested.Stacked on #2433; only the top commit belongs here.
What is in it
replay/gpu.rs: the device (the adapter the runtime would take, through the Agility SDK when there is one); the pipeline from the captured description; memory windows as buffers that hold the captured ranges at their offsets (a reserved buffer with only the touched tiles when a range lies far in);ioto u0 as captured; textures in the state the call uses them in; views at the heap indices the T# name, null views where the capture has none; samplers; the call between two timestamp queries; read-backs with a hash and each channel's range.replay.rs: the child process and the timeout,--timeout,--repeat,--debug(the D3D12 debug layer, its messages printed),--no-run.main.rs: the help.--timeouttakes a finite number of seconds over 0 (no panic on-1,NaN,inf),--repeat1 or more;unhex's errors are passed on. Tests inoptions_parse.Tested
done, its target going from zeros to a uniform fill, 3 image slots without a view (null views); a Draw of 3 that reads no texture replayed todone.device removed after 4852 msin the child (the caller went on), and with the loop budget lowered by a substitution it finished in about 100 ms. That replay led to #2305. This stack's binary replays the same capture the same way (with the budget lowered: 783.6 loop passes a lane on average).cargo test --workspace --no-fail-fast -- --test-threads=4ondca8ceb: 1436 passed, 6 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);hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memoryfailed in this whole-suite run; it fails in the whole-suite run ofmaine1d84b7on this machine too. 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_HEAP_WINDOWS): the replay always uses root UAVs.AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-25 19:46 UTC · original
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!
@SlopTart on GitHub · 2026-11-25 19:46 UTC · original
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_made_here_replays: passed.@madaraXor on GitHub · 2026-11-25 23:44 UTC · original
Thanks, fixed in the force-pushed commit:
--timeouttakes a finite number of seconds over 0 that aDurationholds.-1,0,NaN,infand1e300are usage errors, not panics.--repeat 0is a usage error ("a count of 1 or more").options_parse.@DavidM1911 on GitHub · 2026-11-26 02:12 UTC · original
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
717597891dtodca8cebc27@bmjask on GitHub · 2026-11-25 20:53 UTC · original · reviewed
P2 CLI bug: --timeout passes parsed f64 directly to Duration::from_secs_f64, so -1, NaN, or inf panic rather than yielding usage error. Require finite positive values and add parser tests. --repeat 0 is silently converted to one run by max(1), so reject or document it. This also depends on #2430/#2432 capture state tracking, which cannot faithfully reconstruct partial mip/array transitions until that P1 is fixed. Current Windows CI fails and compute replay remains untested.
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.