Decode signed and integer render targets correctly in diagnostic captures #2699
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2701"
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 VlREX on 2026-11-25T18:28:10Z.
Fix signed RGBA/RG/R channel decoding, R32_UINT and R32_SINT scalar decoding, and grayscale normalization for tiny or very wide finite float ranges. These affect diagnostic PNGs used to investigate rendering. Three new regression tests failed before the patch and pass afterward in an isolated Windows GNU run of the conversion code, alongside the existing format test. No game data or GPU required.
Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T18:30:25Z.
R32_UINTvalues[16_777_216, 16_777_217]produce two black pixels into_rgba. Both values become16_777_216at theas f32cast, so the laterf64normalization sees a zero-width range.R32_SINThas the same precision loss.Could we keep the 32-bit integer channels exact through min/max and normalization, for example by decoding them to
f64? A two-pixelR32_UINTregression with those adjacent values should produce black then white.AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T18:48:24Z.
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and code review of
a86d36ef(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory-gpu --all-targets -- -D warningsand--features diagnostics: 0 warnings.cargo test --locked -p victory-gpu --features diagnostics --lib capture: 7 passed, 0 failed (all 5 new tests pass, includingadjacent_large_32_bit_integers_keep_distinct_gray_levels).VICTORY_D3D12_WARP=1):cargo test --locked -p victory-gpu --features diagnostics --lib -- --test-threads=1: 203 passed, 0 failed, 1 ignored.git merge-treewith #2702 (b48e6c74); the two PRs touch disjoint regions ofcapture.rsand complement each other cleanly.Code Review Notes
i8/i16/i32),R10G10B10_XR_BIAS_A2_UNORM,f64range scaling (preserving adjacent 32-bit integer precision withoutf32overflow), two-pass streaming without double full-frame buffers, andhalf/small_floatNaN decoding all look solid.R32G32B32A32_UINT/_SINT(3, 4) andR32G32_UINT/_SINT(17, 18) remain outsideto_rgba, and on multi-channel signed formats large negative values still pushp99viavalue.abs()while negative outputs clamp atlow = 0.0(consistent with existing HDR float behaviour).Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T18:54:03Z.
Correct direction throughout: integer formats now decode as exact f64 integers (u32/s32 values were silently rounded or sign-mangled through the old f32/word paths), signed formats get their sign, and float_at/half_at keep normalized decoding. Single-channel-as-grey stays consistent.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:15:34Z.
Automated triage for the maintainers.
Needs rebase. This branch no longer merges cleanly into
main: the conflict is incrates/victory-gpu/src/capture.rs. No content review was done yet; it will be reviewed once it is rebased onto currentmain.Generated by Claude Code
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.