GPU: decode packed 16-bit UNORM diagnostic targets #2636
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!2636
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2636"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 17:20 UTC · original
andrewpozdnakov7-jpg:codex2/capture-packed-unorm→main· +30 −0 · 1 files · 2 commits · openProblem
Diagnostic capture skips native B5G6R5_UNORM, B5G5R5A1_UNORM, and B4G4R4A4_UNORM readbacks because the PNG converter has no case for their format IDs.
Change
Decode and normalize each RGB channel by its own bit width before the existing diagnostic scaling. Alpha stays outside RGB scaling, including alpha-only pixels. The bit layouts match Microsoft's DirectXTex loader.
Verification
13f91ca. With this change, all three return the expected opaque RGBA bytes. Full white catches the different green width in B5G6R5, and the fixtures cover channel order, half green, nonzero row padding, and alpha-only pixels.Coordination claim
AI-assisted (Codex 2). Please retain the Git author on cherry-pick or rebase. If folding this change into another commit, please retain Co-authored-by: andrewpozdnakov7-jpg [email protected].
@Bj0rnis on GitHub · 2026-11-25 17:33 UTC · original
Independent Windows 11 hardware + WARP verification of #2636 at
1ef6c9b1(cleangit merge-treewithorigin/main13f91cae, Rust 1.98.1 MSVC):cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1-> 197 passed, 2 failed, 1 ignored (2.86s; includes the new test, only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures also present onmain13f91cae).VICTORY_D3D12_WARP=1): 199 passed, 0 failed, 1 ignored (1.73s).cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings-> 0 warnings.cargo xtask policy-> 184 files ok.Not tested: live game capture/target dump.
AI-assisted test run and summary.
@kotekompotek on GitHub · 2026-11-25 17:47 UTC · original
Reviewed: ids and bit layouts check out — 85 B5G6R5 (R 11:5, G 5:6, B 0:5), 86 B5G5R5A1 (5 bits each from bit 10, alpha dropped per the comment), 115 B4G4R4A4 (4 bits each). Test covers all three plus row padding. CI green.
@Marvisak on GitHub · 2026-11-25 22:22 UTC · original
Automated triage for the maintainers.
Recommended for a maintainer's look. Diagnostic captures (
to_rgbaincrates/victory-gpu/src/capture.rs) returned nothing for the packed 16-bit formats 85 (B5G6R5), 86 (B5G5R5A1) and 115 (B4G4R4A4); they now decode each channel by its own width. I checked the shifts against the DXGI bit layouts (R at 11/10/8, G at 5/5/4, B at 0), and the green width of B5G6R5 is handled separately. Diagnostics-only, 12 lines plus a test that covers row padding. Merges cleanly into currentmain, CIcheckpassing on this head.Generated by Claude Code
@Dukestar69 on GitHub · 2026-11-26 05:08 UTC · original · approved these changes
Tested merged onto
origin/main(63bcca4) on Windows 11 x64:cargo test -p victory-gpu --features diagnostics --lib capture::: 12 passed, 0 failed (including newpacked_unorm_captures_decode_each_rgb_width).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@fuzeofficlal on GitHub · 2026-11-26 16:52 UTC · original · approved these changes
Verified
e91de8a62b2ff4623dbadfdd532e59b18e4dde1dmerged cleanly onto63bcca43on Windows 11 with both an RTX 5090 and WARP (--features diagnostics,VICTORY_D3D12_DEBUG=1).Code review
to_rgba(crates/victory-gpu/src/capture.rs:659-670) match all three 16-bit packed UNORM layouts:85(DXGI_FORMAT_B5G6R5_UNORM):Rbits11..15(/ 31),Gbits5..10(/ 63),Bbits0..4(/ 31).86(DXGI_FORMAT_B5G5R5A1_UNORM):Rbits10..14,Gbits5..9,Bbits0..4(/ 31), alpha bit15ignored.115(DXGI_FORMAT_B4G4R4A4_UNORM):Rbits8..11,Gbits4..7,Bbits0..3(/ 15), alpha bits12..15ignored.B5G6R5's wider green channel before the existing p99 scaling path, and also merges cleanly alongside#2607with no textual conflict incapture.rs.Verification
cargo xtask policy:191 files ok.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--all-features): clean.--features diagnostics,VICTORY_D3D12_DEBUG=1):capture::12 passed, 0 failed on both adapters (includingpacked_unorm_captures_decode_each_rgb_widthatcapture.rs:965).#2607plus an extra pixel probe covering pure R/G/B primaries and all-alpha-only images (0x8000for86,0xF000for115, verifying opaque black output with no scaling distortion or division by zero): 14 passed, 0 failed on both RTX 5090 and 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.