gpu(native): decode RGB9E5 in HDR diagnostic dumps #430

Open
opened 2026-11-27 17:48:07 +00:00 by github-bot · 2 comments
Owner

@⁠theappartment on GitHub · 2026-11-27 17:43 UTC · original

DXGI 67 (R9G9B9E5_SHAREDEXP) reaches the byte-preview fallback in VICTORY_TRACE_PASSES and is skipped by VICTORY_DUMP_TARGETS. Its bytes pack three 9-bit mantissas and one shared exponent, so displaying individual bytes produces misleading colors.

A synthetic texel with mantissas [256, 128, 64] and exponent 16 represents linear RGB [1.0, 0.5, 0.25]. The current pass preview emits [0, 1, 129]. The existing HDR tone map would emit [180, 147, 114] after decoding. The existing Metal resource test confirms those synthetic linear values through a texture view. DXGI 67 was present in 59 traced frames across two local windowed runs.

I plan to decode the shared exponent in the existing HDR path, use it in both diagnostic dump entry points, and add a synthetic regression for channel order and exponent.

Microsoft DirectXMath reference decoder

**@⁠theappartment** on GitHub · 2026-11-27 17:43 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/426) DXGI 67 (`R9G9B9E5_SHAREDEXP`) reaches the byte-preview fallback in `VICTORY_TRACE_PASSES` and is skipped by `VICTORY_DUMP_TARGETS`. Its bytes pack three 9-bit mantissas and one shared exponent, so displaying individual bytes produces misleading colors. A synthetic texel with mantissas `[256, 128, 64]` and exponent `16` represents linear RGB `[1.0, 0.5, 0.25]`. The current pass preview emits `[0, 1, 129]`. The existing HDR tone map would emit `[180, 147, 114]` after decoding. The existing Metal resource test confirms those synthetic linear values through a texture view. DXGI 67 was present in 59 traced frames across two local windowed runs. I plan to decode the shared exponent in the existing HDR path, use it in both diagnostic dump entry points, and add a synthetic regression for channel order and exponent. [Microsoft DirectXMath reference decoder](https://github.com/microsoft/DirectXMath/blob/main/Inc/DirectXPackedVector.inl#L1127-L1141)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 17:48:07 +00:00
Author
Owner

@⁠theappartment on GitHub · 2026-11-27 17:43 UTC · original

/claim

**@⁠theappartment** on GitHub · 2026-11-27 17:43 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/426#issuecomment-7224716961) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 17:43 UTC · original

Claimed by @⁠theappartment. Open a draft pull request with Refs #426 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 17:43 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/426#issuecomment-7224720165) Claimed by @⁠theappartment. Open a draft pull request with `Refs #426` in its description within 24 hours, or the claim expires.
This discussion has been locked. Commenting is limited to contributors.
No description provided.