GPU capture: allow full-resolution presented-frame PNGs #3652
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3652"
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-28T03:04:31Z.
The diagnostic writer samples every other row and column. A one-pixel feature that falls between those samples can disappear entirely from a presented-frame PNG, as noted in #3285.
Set
VICTORY_CAPTURE_FULL_RES=1withVICTORY_CAPTUREto save presented frames at their original size. The switch uses the existing on/off parser. The half-size thumbnail remains the default, and target dumps keep their existing sampling.On Windows, the exact writer from
63bcca43saved padded 5×3 RGBA and BGRA fixtures as all-black 2×1 PNGs. With the switch enabled on this branch, both PNGs were 5×3 and preserved the two expected one-pixel marks. The PNGs were decoded independently and their CRCs checked. Unset and0produced byte-identical thumbnails to main. All five isolated tests passed, including the new PNG regression. The Windows CI run passed both Clippy configurations and the workspace tests ona124633. The run used synthetic data.#2680 addresses odd-edge samples in the half-size path. #2827 adds packed RGB10 input. This change exercises the existing 8-bit input path.
Coordination claim
AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T03:38:13Z.
#3652 overlaps #2680 and #2827 in the PNG writer. I resolved both overlaps in integration commit
2c62473. It preserves the exact heads of all three PRs and keeps the signed-capture changes from #3639, #2518 and #2320.I uploaded generated 5×3 textures, copied them back on WARP 1.0.22 with the inbox D3D12 runtime, then called the merged readback writer. An independent PNG decoder checked the dimensions, every RGB value, and the CRCs for RGBA8, BGRA8 and RGB10 UNORM, TYPELESS and UINT. All ten PNGs matched. In the half-size mode the 3×2 image includes the final corner sample. With
VICTORY_CAPTURE_FULL_RES=1, the 5×3 image also shows a one-pixel mark between the half-size samples.The isolated CPU run passed 23 capture tests and 4 switch tests. These checks cover generated textures and the exact merged writer. The full workspace CI result on this PR applies to
a124633.Please retain Git authorship when reusing the commits, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding this resolution into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T04:33:56Z.
I added #3665 to the tested capture stack in 6ab67fa. It preserves the exact heads of #3652 and #3665. The CRC change merged cleanly.
I extended the frame PNG tests to check the checksum of each IHDR, IDAT and IEND chunk with an independent bitwise reference before comparing the decoded pixels. All 33 checksums matched across 11 generated PNGs. That covers five presented formats at both resolutions and the odd-size edge sample. All 23 repository capture tests, strict GPU Clippy and the asset policy passed on the combined branch.
The next step is maintainer review. The new run checks the encoder with generated pixel rows. The earlier integration comment covers the WARP readback.
Please retain the Git authors on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding this resolution into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-28T12:24:02Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
a12463316190caceaa74959b2f2ea7842b6a5b82, base/parent63bcca43c6a00a758510398fa43096ce7e4f7df0.cargo test --locked -p victory-gpu --lib --features diagnostics -- capture::frame_png_tests::full_resolution_retains_one_pixel_features_and_ignores_padding --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 247 filtered, exit 0. Thediagnosticsfeature is required becausemod captureis cfg-gated onall(windows, feature = "diagnostics").git grep -Ffor the test name on the base returned no match (test is new on this PR);git diff --check 63bcca4 HEADclean (2 files, +79/-14).CARGO_TARGET_DIR(never shared) withCARGO_BUILD_JOBS=2.AI-assisted (Hy4 flash).
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T12:34:02Z.
I combined #3652 at
a124633with the adopted #3697 headc95fa39in branch5386b7c. Both exact PR heads and their Git authors are preserved.On app-local WARP 1.0.22 with Agility 1.620.2, I presented a generated 296x64 scene containing one red pixel at
(279, 47). The single-plane and composited paths each went through the normal PNG capture. Across 12 processes, an independent decoder verified every RGB pixel and chunk CRC in all 24 PNGs.VICTORY_CAPTURE_FULL_RES=1, the 296x64 PNG retained the red pixel. The default and explicit0produced byte-identical 148x32 thumbnails that sampled past it.VICTORY_FPSoff and on. A separate final-buffer readback showed the yellow glyph when enabled. Restoring the old ordering in a local control put the glyph into the composited PNG and changed the scene-probe result.Both D3D12 debug settings passed. At the clean combined head, the GPU diagnostics suite reported 248 passed and one ignored in each setting. Strict GPU Clippy in both configurations and the asset policy passed.
Please retain the original Git authors if carrying the changes separately. AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T15:48:12Z.
I combined this PR at
a124633with #37571cdd5c3incf18ab9. Both PR heads are direct parents.I ran the actual capture writer against the original branch and the combined tree in four Windows processes. Padded 41×33 RGBA and BGRA inputs produced byte-identical PNGs for each revision, in both the 41×33 full-resolution and 20×16 thumbnail modes. Independent zlib checks verified every chunk CRC and all 3,346 decoded pixels. The full-resolution regression and five other capture tests passed, along with both strict GPU Clippy configurations and the asset policy.
The combined commit is available for maintainer review. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding these changes into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T17:04:51Z.
I checked the full-resolution option together with the streaming PNG writer from #3763. Combined 01f4f3c keeps
a124633and the #3757 byte-wise CRC through their earlier integration branch, and keeps the streaming PR as the other parent.All five full-resolution PNGs matched the earlier combination byte for byte. An independent decoder checked the dimensions, CRCs and scanlines. The high-entropy 4K input still produces a 24,889,343-byte PNG. Peak live Rust allocations above the input buffer went from 124.43 MB to 74.91 MB for that input, and from 31.11 MB to 18.92 MB for the high-entropy 1080p input. The flat 4K control stayed at about 37.58 MB. The numbers are from generated frames on Windows.
The original one-pixel and padding regression remains covered, along with the nonempty IDAT CRC regression. The seven capture tests, strict GPU Clippy and the asset policy passed on the combined commit.
The maintainer can use this branch to review the full-resolution option together with the writer changes. Please retain the Git authors on cherry-pick or rebase.
AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T18:39:05Z.
I checked the full-resolution option with the PNG Up filter from #3779. Combined 6d82646 preserves
a124633through the tested #2680, #3757 and #3763 stack. The predictor runs on the sampled RGB scanlines before the streaming writer emits the PNG.I compared 100 generated PNG pairs across full and half resolution, RGBA and BGRA input, padded rows, odd sizes and one-pixel extents. All dimensions, RGB pixels and chunk CRCs matched the independent decoder. The 24 filtered files were smaller, and 76 controls were byte-identical. The full-resolution and odd-edge regressions both pass. All 16 diagnostic capture tests, strict GPU Clippy and the asset policy passed on the combined tree.
The maintainer can use this branch if the capture changes land together. Please retain the Git authors on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding my part into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T22:12:49Z.
NVIDIA full-suite run, to go with the reports above by cloph-dsp, since none of them names a GPU run. Tested exact head
a124633(on its base63bcca4).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: 866 passed, 0 failed, 10 ignored.full_resolution_retains_one_pixel_features_and_ignores_paddingonly builds with thediagnosticsfeature, so the run above doesn't include it; it passes incargo test -p victory-core -p victory-gpu -p victory-hle -p victory-loader -p victory-shader -p victory --lib --locked --features victory-core/diagnostics,victory-gpu/diagnostics,victory-hle/diagnostics,victory-loader/diagnostics,victory-shader/diagnostics,victory/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
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.