D3D12.X: read back the swap chain buffer for the frame dump and guard readback_copy #2713
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!2713
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2713"
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?
@itsSio on GitHub · 2026-11-26 08:05 UTC · original
itsSio:d3d12x/frame-dump-swapchain-readback→main· +178 −12 · 1 files · 1 commits · openWith
XCL_FRAME_DUMPset and no composited present, the frame dump read back the title's ownsrcwith a texture copy recorded at present time. XCL does not know which state the title keepssrcin, andreadback_copyrecorded the copy for any resource, buffers included. The dump now reads back the swap chain buffer XCL has just copied into (COPY_DEST -> COPY_SOURCE -> PRESENT), as the composited path already does from RENDER_TARGET, andreadback_copyrefuses what it cannot copy to a buffer: anything other than a single-sample 2D texture with a size and a footprint format, or a failedGetCopyableFootprints. Part of #499 (observation 2).What is in it
D3D12.X: read back the swap chain buffer for the frame dump and guard readback_copy:crates/xcl/src/hle/d3d12x/present.rs(dump_backbufferused by both present paths;readback_possiblechecked inreadback_copy; a unit test of the checks and a GPU test on WARP that dumps a filled swap chain buffer and refuses a buffer)Tested
Commit
b25ae0cf3816b2538742645b755ea8cf967976fd, clean checkouts on each PC, debug builds for workspace tests and release builds for retail smoke runs.32.0.16.1088), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200, Rust 1.97.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5.cargo build --workspace: exit 0.cargo test --workspace -- --test-threads=4: 1431 passed, 0 failed, 47 ignored.SKIPPEDGPU tests: wave64 tests (no wave64 on this adapter), f16 / f16-conversion wave32 refusals (#1426),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(driver cache, Developer Mode).cargo test -p xcl --lib frame_dump_tests: 5 passed, 0 failed, 0 ignored. With thereadback_copycheck removed, the new test fails on the buffer assertion.XCL_FRAME_DUMP=1+XCL_PRESS_A_AT=15,25,35,45,55check (release, RTX 5080): bothmain08db8020(3258frames, non-black fromframe_2780at ~105 s) andb25ae0cf(3306frames, non-black fromframe_2300at ~89 s) capture genuine non-black BMPs (max=249,mean=36.6,99.8%non-dark) with0crashes,0device removals, and0nvwgf2umx.dllfaults.32.0.16.1088), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200, Rust 1.99.1 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100 DXC 1.8.2502.11.cargo build --workspace: exit 0.cargo test --workspace -- --test-threads=4: first run had 1 unrelated failure (vfs_hooks::tests::move_with_locked_overlay_source_preserves_destination). Rerun with--no-fail-fast: 1431 passed, 0 failed, 47 ignored; that test passed 10/10 standalone.SKIPPED: the same 26, plusuploads_start_from_each_subresources_state(no D3D12 debug layer).cargo test -p xcl --lib frame_dump_tests: 5 passed, 0 failed, 0 ignored.present.rsGPU tests run on WARP.Regression run
main(08db8020, RTX 5080, release,XCL_FRAME_DUMP=1):PR (
b25ae0cf, RTX 5080, release,XCL_FRAME_DUMP=1):Not tested
nvwgf2umx.dllcrash onmain(did not reproduce on RTX 5080 onmain08db8020).scripts/smoke.ps1on the RTX 2080 SUPER.AI use
Ran via Samaritan:
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.