GPU: reconstruct normalized rectangle attributes in storage units #3653
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3653"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T03:15:56Z.
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.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T03:18:32Z.
Verified
9e21c05a0111f247de3752506626090f8b2f95b0on Windows CI. Both Clippy stages and the workspace test stage passed.The local exact-source harness matched all 51,511,296 generated component results against
63bcca43, and both revisions passed their nine rectangle tests. The median CPU speedup was 1.30–1.45× for float positions with RGBA8 color and 1.58–1.73× for mixed normalized attributes, across 19 alternating pairs per size. The float-only control ranged from 0.97–1.04×. Compatibility check with packed colorsPlease retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T09:41:23Z.
I tested #3705 together with this head. Combined commit
298ba6fpreserves both heads. Git combined them cleanly.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
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the changes into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T22:22:14Z.
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
9e21c05(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.