Repository navigation
GPU: expand packed rectangle colors from the selected corner - #3646
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
|
Verified All ten primitive tests passed using the exact source and unchanged right-angle helper. Git merged this head cleanly with #2729 at Please preserve the Git author if cherry-picking or rebasing, or include this trailer if folding the change into another commit.
|
Dukestar69
left a comment
There was a problem hiding this comment.
LGTM — verified on Windows:
cargo test -p victory-gpu --lib primitive::passed (10/10, includingpacked_unorm_uses_the_position_corner_in_each_vertex_order)cargo clippy -p victory-gpu --all-targets -- -D warningspassed with 0 warningscargo xtask policypassed (191 files ok)
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
|
I checked #3653 with the current All ten existing rectangle tests, including the packed-color test for every vertex order, passed on both revisions. I also expanded 4,096 generated rectangles with float positions and packed R10G10B10A2, UNORM8, SNORM8 and UNORM16 in one vertex. The full output buffers matched byte for byte. A second fixture compared 51,511,296 reconstructed normalized codes. These checks ran the exact rectangle expansion source on CPU and the asset policy passed. Please retain the Git authors on cherry-pick or rebase, or add AI-assisted with OpenAI Codex. |
The CPU rectangle fallback leaves
R10G10B10A2_UNORMat the copied corner’s value. Reconstruct the fourth color from the two adjacent vertices and the right-angle vertex already selected from the position. Clamp RGB to 10 bits and alpha to 2 bits.This replaces the closed #2243. Its review identified that the packed calculation assumed the second vertex was the right angle. The new regression supplies a
float2position and packed color in the same vertex and exercises all six orders. The fourth position and all four color channels match the expected values for every order.The same regression fails on
63bcca43. All ten primitive tests passed with the fix when compiling the exact module and its unchanged right-angle helper withrustc --test. The local test exercises CPU expansion. DXGI input-assembler format support.AI-assisted with OpenAI Codex.