D3D12.X: the capture format of one draw or dispatch #2429
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!2429
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2429"
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:37 UTC · original
madaraXor:capture-format→main· +456 −0 · 3 files · 1 commits · openA GPU hang in a retail title costs a whole game run per experiment. This stack writes one draw or dispatch of a named shader to disk during a run (
XCL_CAPTURE_DRAW) and runs it again alone, in seconds (xcl replay). Part of #675.This first part is the format of a capture only; nothing writes one yet.
What is in it
hle/d3d12x/capture/manifest.rs: themanifest.jsonof a capture folder (the call, shader files, the PC pipeline description, root arguments, fixed-function state, targets, memory ranges, textures, views, samplers, descriptor slots, what was left out),Manifest::write/Manifest::readwith a version check. D3D12 structures are kept as hex of their bytes.hle/d3d12x/capture.rs,mod.rs: the module.unhexrefuses an odd number of digits or non-hex text;Manifest::readchecks every hex field, that D3D12 structures have this build's size, that root arguments are whole dwords, and that every file it names is a plain name in the capture folder (plain_name). Tests:a_damaged_manifest_is_refused,plain_names_only.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on69e0883: 1423 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; both fail 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
windowscrate structure layouts (the manifest keeps their bytes).AI use
🤖 Generated with Claude Code
@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 the new capture-format tests (manifest round-trip, version refusal, subresource/plane copy, texture-state list, hex round-trip): 3 passed.
@DavidM1911 on GitHub · 2026-11-25 19:54 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!
@madaraXor on GitHub · 2026-11-25 23:43 UTC · original
Thanks, fixed in the force-pushed commit:
unhexnow returnsResult: an odd number of digits, or anything but hex digits (signs included), is an error that names the digit.Manifest::readchecks every hex field after the version check:memory.bin,tex_<id>.bin) must be one plain name inside the capture folder (plain_name).hex_round_tripsnow expects the errors;a_damaged_manifest_is_refusedcovers odd and non-hex fields, wrong-size structures, partial root dwords and paths out of the folder;plain_names_onlycovers the name check.@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
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.