Repository navigation
gpu: test packed light decoding across the HDR range - #77
Merged
Merged
Conversation
simnJS
approved these changes
Nov 25, 2026
simnJS
left a comment
Collaborator
There was a problem hiding this comment.
The expected binary16 words check out against the shader, and keeping blue = 256 so the R32 payload stays normal is a nice touch.
Nits for a follow-up:
- make the adapter lookup skip instead of
unwrap(); - update the doc comment;
- maybe cover green's max.
Approving, and I'll merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Extend the existing forced R9G9B9E5-to-RGBA16F GPU regression to cover the shared-exponent maximum (65,408), minimum positive value (2^-24), and zero, preserving alpha one. The original GPU cases exercise values at or below one; the CPU conversion already covers every exponent/mantissa.
Expected binary16 words are independent literals. Check the packed source bits before the decoded samples so an R32_FLOAT clear changing the payload cannot hide a conversion error. Sample several texels, retain the existing ordering/replay checks, and report the adapter selected by the device's LUID and the forced host format.
Part of: #55. The production reader-list decode and native-versus-stand-in expectation fixes are already on main; this adds coverage and hardware evidence only.
Depends on: none.
Area
crates/xtp-gpu/src/resource.rs, existing test module only. No production behavior or configuration changes.Tests
cargo xtask pr-checkpasses on my machine.Both the reported format-view regression and the extended forced-stand-in regression passed on WARP and an NVIDIA GeForce RTX 5050 Laptop GPU, driver 621.40 (Windows 32.0.16.2140). The device's LUID resolved to vendor 0x10de/device 0x2dd8. The forced texture format is RGBA16F (10); maximum, minimum, zero and alpha-one assertions passed with exact expected words.
Both targeted regressions also passed under the strict serial WARP debug layer. The full WARP PR check passed all six steps with normal workspace threading, including both warnings-denied Clippy configurations. Sources were touched and compilation paths and branch-specific output verified. A separate reviewer checked the expected encodings, source payloads, readback offsets, adapter identification and cleanup. These synthetic tests do not establish the cause of a dark world frame.
Provenance
AI assistance: Codex wrote and independently reviewed the synthetic test extension and ran the checks. Expected encodings were calculated independently of the production converter. No external implementation or title data was copied.
Checklist
<area>: <summary>; one topic; under 400 changed lines.