Decode RGB9E5 in diagnostic PNG captures #2586
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-25T16:18:43Z.
The 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.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T17:06:47Z.
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:19:56Z.
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
upstream-sync referenced this pull request2026-11-26 03:05:09 +00:00
Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-27T00:37:35Z.
I put together a small follow-up on top of
cb11b4cfor diagnosing buffers where the producer explicitly packs RGB9E5 into anR32_UINTresource. WithVICTORY_DUMP_RGB9E5_TARGETS=2,7, the target dumper keeps the normal PNG and writes an additional-as-rgb9e5PNG for those two indices if their format is R32_UINT. It reuses your format-67 decoder. The default R32_UINT output stays grayscale. Follow-up commitI tested the native grayscale and optional color outputs against the same 2×2 pitched buffer containing pure red, green, blue and black. The four capture tests pass on Windows x64 with
cargo test --locked -p victory-gpu --features diagnostics --lib capture::. This can land separately after #2588.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.