Repository navigation
GPU: reconstruct normalized rectangle attributes in storage units - #3653
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
|
Verified The local exact-source harness matched all 51,511,296 generated component results against Please retain the Git author on cherry-pick or rebase, or add AI-assisted with OpenAI Codex. |
|
I tested #3705 together with this head. Combined commit The normalized-attribute results matched byte for byte on 4,096 generated rectangles in each of five layouts, including the incomplete buffer tails. Nine primitive tests, strict GPU Clippy and the asset policy passed. In the optimized CPU test, the added layout lookup change improved eight of the ten layout-and-batch combinations. The other two were within 2.3% of this branch alone. The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add AI-assisted with OpenAI Codex. |
Change
The CPU rectangle fallback completes the fourth corner as
a + b - right. For UNORM and SNORM attributes, perform that arithmetic in storage units and clamp once when writing the result. The integer codes and their intermediate sums fit exactly in f32. Both signed encodings of the negative endpoint still decode to the same value.Verification
63bcca43. This covers every triple for UNORM8 and SNORM8, plus all 16-bit codes for one corner against endpoint neighborhoods for the other two and generated 16-bit triples.AI-assisted with OpenAI Codex.