shader: lower image stores of fewer than four channels #94
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/94"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T14:29:27Z.
What this changes
image_storewith admaskother than0xFwas refused ("an image store of some channels"). As for typed buffer stores (#56), GFX11 and older store 0 in the channels the mask leaves out (LLVM 88421ea "[AMDGPU] Trim zero components from buffer and image stores", Mesa 4a6ee2c4833), so the store now writes the whole texel: the data holds the enabled channels in turn (two per VGPR withd16), and the others are 0. Admaskof 0, whose behaviour is undocumented, is still refused. docs/native-host.md gets the image counterpart of the "Typed buffer stores" note.Tests: hand-assembled stores with
dmask0x1, 0x3 and 0x5 now translate (image_stores_of_some_channels_lower), and a Windows value test reads the UAV back (image_stores_of_some_channels_zero_the_others).How it was tested
cargo test -p victory-shaderand arm64cargo test --workspace(value probes run only in the Windows CI)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings, also with--all-featurescargo xtask policyChecklist
VICTORY_*variable and documented (none added)Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T14:54:53Z.
Review: CHANGES_REQUESTED
Thanks, this is the image-store version we'll keep. One thing: docs/native-host.md says "This is not a guess", but the LLVM/Mesa evidence only shows zero-fill of missing trailing components. Please narrow that to prefix dmasks and mark gapped masks (e.g. 0x5) as a guess.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T15:01:23Z.
Done: the docs and the code comment now call prefix dmasks (0x1, 0x3, 0x7) established, by the zero-fill of missing trailing components in LLVM 88421ea and Mesa 4a6ee2c4833, and mark gapped masks (0x5, or one without red) as a guess. No code change.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T16:03:52Z.
Review: DISMISSED
The prefix dmasks are now documented as established and gapped masks as a guess, in the docs and the code comment. CI is green. Approving.