Shaders: lower partial-channel typed buffer stores #342
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!342
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-342"
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?
@tarcisioads on GitHub · 2026-11-24 02:24 UTC · original
tarcisioads:shader/typed-buffer-store-partial→main· +69 −4 · 1 files · 1 commits · openSupport partial-channel typed
buffer_store_format_*(count < 4) incrates/victory-shader/src/emit/lower.rs:count1..=4 in typedbufferStore.f32(still rejecting*offen || *offset != 0), padding unused channels up to 4 withundef(f32) and passing(1u8 << count) - 1as thewriteMask.partial_channel_typed_buffer_store_lowerscoveringbuffer_store_format_x,buffer_store_format_xy,buffer_store_format_xyz, andbuffer_store_format_d16_xyz.Verification
cargo test -p victory-shader(57/57 passed on macOS; Windowsdxil.dllvalidation not run)rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower.rs(ok)cargo xtask policy(ok)@r4tedx on GitHub · 2026-11-24 03:14 UTC · original
Review note: typed stores now pass a partial mask (
i8((1u8 << count) - 1)), and the DXIL validator rejects that for a typed UAV. Adding validation to this PR's own fixture (dxil.dll from the Windows SDK) fails withDXIL's
bufferStoreon a typed buffer has to write all four components (mask0xF); the components the instruction does not supply need explicit values. D3D12 only checks the container hash, so a driver may still accept the module, which is why the test passes without the validator. What the hardware writes to the components a typed buffer store leaves out I could not find stated for MTBUF; for image stores the RDNA 2 ISA says the missing components get 0.From the documents and synthetic tests only; I have no copy of the title and have not run this on console hardware.
@tarcisioads on GitHub · 2026-11-24 11:18 UTC · original
Rebased onto
main(ffe310e) and addressed @r4tedx's DXIL validator feedback in4950d61:bufferStore.f32with0.0f(self.s.m.f32(0)) and pass0xFas thewriteMask.cargo test -p victory-shader(97 passed, 0 failed on macOS;dxil.dllvalidation still needs Windows).@Marvisak on GitHub · 2026-11-25 00:28 UTC · original · edited 2026-11-25 22:16 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflict incrates/victory-shader/src/emit/lower.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: evidence for zero-filling the channels a partial typed buffer store does not supply (or refuse those cases), and
dxil.dllvalidation inpartial_channel_typed_buffer_store_lowers.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.