Shaders: keep packed operands and results in fixed arrays #3813
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3813"
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-29T00:20:14Z.
Packed lowering knows it will read two or three operands per half and produce two halves. Keep those values in fixed arrays and read the operands in their existing order.
Across seven alternating Windows release comparisons, nine generated packed multiply, FMA and mixed shaders produced byte-identical DXIL and passed the Microsoft validator. The counting allocator measured three fewer allocations and 96 fewer requested bytes per packed instruction in all 63 comparisons. At 512 instructions, the mixed shader went from 16,968 to 15,432 allocations, with the same reallocation count.
The full translation time for mixed chains was 0.948× main at 128 instructions and 0.961× at 512. Pure multiply medians were 0.989–1.022× main. FMA medians were 0.945–0.974× with a wider spread across runs. The packed integer and FP16 controls on WARP, 33 lowerer tests, both strict Clippy configurations and the asset policy passed.
Please 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-29T00:23:54Z.
Windows CI passed on
10474db, including both Clippy configurations and the workspace tests. The 512-instruction mixed fixture made 1,536 fewer allocations and requested 49,152 fewer bytes, with byte-identical, validator-accepted DXIL.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 change into another commit.AI-assisted with OpenAI Codex.
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.