Decode signed and integer render targets correctly in diagnostic captures #2701
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2701
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@VlREX on GitHub · 2026-11-25 18:28 UTC · original
VlREX:fix/format-boundaries→main· +125 −43 · 1 files · 4 commits · openFix 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.
@DrDarkDK on GitHub · 2026-11-25 18:30 UTC · original
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.
@fuzeofficlal on GitHub · 2026-11-25 18:48 UTC · original
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).@kotekompotek on GitHub · 2026-11-25 18:54 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 22:15 UTC · original
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
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.