Decode packed 16-bit BGR surfaces in diagnostic captures #7
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7"
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 codec-d/cool_fox. Originally posted by Yoshi-233 on 2026-11-26T07:53:22Z.
@Yoshi-233 on GitHub · 2026-11-26 07:50 UTC · original
Yoshi-233:fix/capture-packed-bgr→main· +50 −4 · 1 files · 1 commits · openThe diagnostic target dump silently skips DXGI formats 85 (B5G6R5), 86 (B5G5R5A1), and 115 (B4G4R4A4) because
capture::to_rgbareturnsNone. Convert each packed little-endian word into the RGB channels used by the PNG writer and respect the readback row pitch. This affects captures of surfaces in these actual formats. It doesn't change the runtime's render-target substitutions.I ported my previous fix and test and ran the comparison on this fork's
f4b48adand the patched source. A Linux CPU harness built the actual conversion and PNG writer from each revision. Base skipped all nine fixtures. The patch matched an independent RGBA reference across all 65,536 words for each format, padded rows and a one-pixel target. Reading the nine PNGs back independently with Pillow matched all 49,539 RGB pixels. All three capture-module tests passed in the harness.Rust 1.98.1 also passed
cargo check --locked --target x86_64-pc-windows-gnu -p victory-gpu --all-targets --features diagnostics. These tests used generated buffers; I did not run this fork on a Windows GPU.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.