Diagnostics: capture RGBA32 unsigned targets #2565
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2567"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T15:59:21Z.
R32G32B32A32_UINThas a 16-byte texel layout, but the diagnostic capture converter returnsNone, so there is no PNG for these targets. Decode R, G, and B as unsigned 32-bit values and use the existing diagnostic color scaling and opaque PNG alpha.The same two pitched synthetic rows return
Noneon67e8ae1and produce RGB(255, 127, 0)and(0, 63, 255)on the patch. The fixture includes the high unsigned bit and sentinel values in source alpha and row padding.Validation: diagnostics capture tests, strict GPU Clippy, and the staged asset policy.
DXGI format definitions · Coordination claim
If you cherry-pick or rebase this commit, please retain its Git author. If you fold the change into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted. Verification used synthetic readback data.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T19:20:35Z.
Automated triage for the maintainers.
Merge candidate. This is a recommendation to look, not an approval. The PR adds DXGI format 3 (
R32G32B32A32_UINT, 16-byte texels) tocapture::to_rgbaincrates/victory-gpu/src/capture.rs. RGB is decoded as unsigned integers and scaled like the other non-8-bit formats, so these targets get a PNG instead of being skipped. The new commit (035adfa) only moves the test intomod tests, next tounorm16_and_xr_bias_targets_decode_as_their_formats. The code is unchanged from the head reviewed before, and the expected bytes still follow from the existing scaling with a 20-byte row pitch.Reply to the author: thanks, the nit is addressed.
CI:
checkpassed (Windows).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T19:32:35Z.
Addressed the test placement request. The existing RGBA32 UINT regression now sits in capture::tests beside unorm16_and_xr_bias_targets_decode_as_their_formats. All three capture module tests passed with diagnostics enabled, including the moved regression. Commit 035adfa
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-26T01:00:36Z.
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
035adfa(on its base67e8ae1).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 773 passed, 0 failed, 9 ignored.rgba32_uint_captures_keep_rgb_and_ignore_source_alphaonly builds with thediagnosticsfeature, so the run above doesn't include it; it passes incargo test -p victory-gpu --lib --locked --features diagnostics(same skips).--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-26T23:07:50Z.
Independent local verification of PR #2567 (
035adfa), from Windows with Rust 1.100.0/MSVC (repo pins 1.98.1) and per-worktreeCARGO_TARGET_DIR,CARGO_BUILD_JOBS=2, no game data.cargo test --locked -p victory-gpu --lib --features diagnostics -- --exact capture::tests::rgba32_uint_captures_keep_rgb_and_ignore_source_alpha→test result: ok. 1 passed; 0 failed; 199 filtered out, exit 0.captureis gated behind#[cfg(all(windows, feature = "diagnostics"))], so--features diagnosticsis required.git diff --checkagainst merge base67e8ae1→ clean (exit 0).git grepforrgba32_uint_captures_keep_rgb_and_ignore_source_alphaonorigin/mainfound no match, so the regression test is added by this PR.This adds a Windows/MSVC 1.100 data point alongside the existing NVIDIA full-suite report. Only the synthetic capture unit test was replayed; no real GPU capture or title target was used. AI-assisted (Hy4 flash). GPU/driver: N/A for this CPU-only capture-decode test. No game data.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T23:27:53Z.
Review: APPROVED
LGTM — verified on Windows against
origin/main(63bcca4).RGBA32_UINTdiagnostic capture targets passes cleanly with both default and--features diagnosticsbuilds.cargo test -p victory-gpu --lib --features diagnostics capture:: -- --test-threads=1: all passed.cargo clippy -p victory-gpu --all-targets -- -D warnings(default +--features diagnostics): clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T23:50:24Z.
Review: APPROVED
Looks good — clean, focused addition for
DXGI_FORMAT_R32G32B32A32_UINT(3) captures.Checked
crates/victory-gpu/src/capture.rs:665-666andcapture.rs:861-875against the full readback and decoding path:1..=2(R32G32B32A32_TYPELESS/FLOAT) andcrate::resource::element(3), andcapture::read_backimposes no format filter that blocks it.u32_at(b, i) as f32with color (grey == false) 99th-percentile scaling handles all-zero (black), constant non-zero (white),u32::MAX(finitef32), and ignores source alpha cleanly.main(63bcca43) alongsider32_integer_to_rgba(42 | 43), passingcargo clippy --features diagnostics --tests -- -D warningsand all 12capture::tests.Verification (
035adfa3):cargo xtask policyandcargo clippy -p victory-gpu(default and--features diagnostics,--tests -- -D warnings): passed.capture::tests::(3/3) and merged-with-maincapture::(12/12): passed on both hardware GPU and WARP.DXGI_FORMAT_R32G32B32A32_UINT2x2 texture throughcapture::read_back(RowPitch = 256) andto_rgba: decoded exact expected RGBA output on both hardware GPU and WARP withVICTORY_D3D12_DEBUG=1(zero Debug Layer errors).Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T00:10:30Z.
@cloph-dsp Thanks for checking the CPU conversion. I ran the readback path on this PR's exact head
035adfawith a real D3D12R32G32B32A32_UINT2×2 texture and a 256-byte row pitch. The fixture fills both rows with distinct high-bit RGB values, varies source alpha, and puts a sentinel in the upload padding.The PR returned all four expected RGBA pixels in three fresh WARP processes. The identical fixture on
main(63bcca4) completed the GPU copy but returned no converted pixels in all three processes. The four capture tests pass on the PR with the fixture, as do strict clippy checks with default and all features and the asset-policy check.The test-only commit is ready to pick up. Maintainers can cherry-pick it with its Git author or keep
Co-authored-by: andrewpozdnakov7-jpgif folding it into another commit. The GPU here was WARP.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.