Repository navigation
Shaders: lower partial-channel image_store - #332
tarcisioads wants to merge 1 commit into
Conversation
|
Review note: the partial mask is passed through to DXIL ( The console's rule for the channels left out is in the RDNA 2 ISA (MIMG D3D12 only checks the container hash, so a driver may still take the module; that is why the test passes without the validator. From the documents and synthetic tests only; I have no copy of the title and have not run this on console hardware. |
81ef5a3 to
a5b0dcb
Compare
|
Rebased onto
|
|
I retested
Test commit checks all channels against a nonzero starting texel to distinguish clearing from leaving a channel untouched. It also corrects the existing lowering test’s d16 selector to bit 31 of MIMG word 1. Bit 15 of word 0 controls R128. The changes are confined to tests and the test harness. |
|
I extended the initialized RGBA32F readback from
The results were identical for f32 and packed d16 on native Windows, RTX 4070 Ti and WARP. All compared shaders passed DXIL validation. On #332, the shared zero-mask normalization changes AI-assisted with Codex. |
* Lower nonzero RDNA2 image store channel masks Follow the RDNA2 DMASK semantics and the DXIL typed UAV store contract. Exercise every nonzero mask with f32 and packed f16 stores on D3D12. Related to Marvisak/VIctory#920 and Marvisak/VIctory#332. * Record image-store verification and shader timing scope --------- Co-authored-by: tecnofifamobile-ai <255379004+tecnofifamobile-ai@users.noreply.github.com>
|
Updated |
a5b0dcb to
5048d2d
Compare
5048d2d to
7b68d7b
Compare
|
Automated triage for the maintainers. Needs work. The lowering in
Overlaps #160, which lowers partial image stores the same way with GPU-checked tests. CI: no check runs on the head commit. Generated by Claude Code |
7b68d7b to
5a5c155
Compare
|
Addressed all three triage points:
|
Support partial-channel
image_store(dmask != 0xF,dmask != 0) incrates/victory-shader/src/emit/lower.rs:v[reg..]registers (for both 32-bit andd16packed f16), pad missing channels with0.0f(self.s.m.f32(0)), and pass0xFas thewriteMaskargument ofdx.op.textureStore.f32(matching RDNA2MIMG DMASKsemantics and the DXIL validator's typed-UAV rule).image_storewithdmask == 0explicitly ("an image store with no channels").partial_channel_image_store_lowerscovering0x0refusal, 32-bit partial masks (0x1,0x3,0x5), andd16partial mask (0x7, encoded at word 1 bit 31) withunorm = 1(word 0 bit 12), verifyingSFI0RESOURCE_HEAPemission.Verification
cargo test -p victory-shader(119 passed, 0 failed, 1 ignored benchmark on macOS; Windowsdxil.dllvalidation not run)cargo xtask policy(ok)