D3D12.X: texture read-backs as PNG images #2432
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!2432
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2432"
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-images→main· +1889 −1 · 11 files · 4 commits · openTexture read-backs as pictures, for
xcl replay(next PRs), which shows what a captured draw wrote. Part of #675.Stacked on #2431; only the top commit belongs here.
What is in it
gpu/texel_image.rs: the texels of the common DXGI formats as numbers (8 / 16 / 32-bit UNORM, UINT and float, 10:10:10:2, 11:11:10 float, the depth planes); an RGB image of a read-back (UNORM as it is, float and integer formats scaled by their largest finite value and square-rooted, the slices of a 3D texture side by side) with each channel's least and largest value; that image as a PNG (miniz_oxide, already a dependency).main; the per-subresource state fix of the review lives in #2430 / #2431.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on47447e4: 1434 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
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 read-back tests (manifest, CRC32-vs-PNG, float/int scaling and 3D slice tiling): 3 passed.
@DavidM1911 on GitHub · 2026-11-25 20:04 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). 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. The per-subresource state point is fixed where it lives:
This PR only reads back what #2431 copied, so it gets that behaviour unchanged. The stack is rebased on current
main(with #2420), and the description has the new suite counts and smoke blocks.@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
dc4b422833to47447e49b5@bmjask on GitHub · 2026-11-25 20:28 UTC · original · reviewed
P1: capture state tracking is per resource, but normal barriers are per subresource. capture.rs:247-261 drops the subresource, and list_x.rs:4040-4048 passes b[6] while discarding b[4]. The snapshot helper later emits ALL_SUBRESOURCES with one recorded StateBefore (list_x.rs:111-124). After a valid transition of only one mip/slice, capture can therefore issue an invalid all-subresource transition for other slices, causing debug-layer errors or incorrect GPU state when capture is enabled. Track state per subresource, or decline capture after a partial transition unless complete states are known.
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.