Decode RGB9E5 in diagnostic PNG captures #2588
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!2588
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2588"
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?
@DoubleD17 on GitHub · 2026-11-25 16:18 UTC · original
DoubleD17:fix/capture-rgb9e5→main· +29 −0 · 1 files · 1 commits · openThe diagnostic capture path skips DXGI format 67 (R9G9B9E5_SHAREDEXP) because the converter has no decoder for it. Decode the three 9-bit RGB mantissas and their shared exponent before applying the existing diagnostic color scale. The change preserves the new RGBA8 statistics on main.
On Windows x64 with Rust 1.98.1 MSVC,
cargo test --offline --locked -p victory-gpu --features diagnostics --lib capture::passed 2/3 on main with the same fixture and 3/3 on6ff69a38e445206b0cb9f3abc1eb876c8a70ba83. The cases cover shared-exponent changes across padded rows and an R32_UINT grayscale control. The asset policy check passed. A prior independent D3D12 WARP check observed format 67 and a 256-byte row pitch for 1×2 typed textures with no flags, render-target flags, and UAV flags. That check covers texture creation and footprint layout. The CPU test reaches the RGBA buffer passed to the PNG encoder.AI-assisted.
@cloph-dsp on GitHub · 2026-11-25 17:06 UTC · original
Independent verification (claim on #1633, comment 7168884733), Windows/MSVC, Rust/Cargo 1.100.0, no game data, AI-assisted (Hy4 flash).
At the current head
cb11b4cthe reported clippy site already uses the suggested form:crates/victory-gpu/src/capture.rs:875isrgba.as_chunks::<4>().0, so the originalchunks_exact_to_as_chunksfailure is already addressed in the PR. The only current check run ischeck= pass (https://github.com/Marvisak/VIctory/actions/runs/45658864591/job/139362911132).Local results:
cargo check --locked -p victory-gpu --all-targets --all-features— finished cleanly; only pre-existing deprecation warnings inobject.rs(fetch_update).cargo test --locked -p victory-gpu --features diagnostics --lib rgb9e5_tests -- --test-threads=1— 1 passed / 199 filtered.cargo test --locked -p victory-gpu --features diagnostics --lib capture::tests::crc_matches_the_png_check_value -- --exact --test-threads=1— 1 passed / 199 filtered.origin/main13f91ca: the rgb9e5 test does not exist (0 tests for the same filter).Limitation: this machine's cargo 1.100.0 is a direct binary with no clippy component and no rustup, so I could not rerun strict clippy locally; the compile check and CI green status are the evidence. No files changed, no competing PR.
@Marvisak on GitHub · 2026-11-25 22:19 UTC · original
Automated triage for the maintainers.
Merge candidate (small, diagnostics only).
capture::to_rgbareturnedNonefor format 67 (R9G9B9E5_SHAREDEXP), so captures of such targets had no PNG. The new arm decodes it as the public DXGI format defines it: three 9-bit mantissas scaled by2^(e - 15 - 9), with the 5-bit exponent in bits 27..31. I checked the test values by hand:0x81010100gives (1, 0.5, 0.25), and the expected bytes follow from the existing max scaling. No other arm covers 67, and no open PR adds the same thing.CI:
checkpassing. Merges cleanly into currentmain. A recommendation to look at it, not an approval.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.