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 rebase. Previous verdict for this head: merge candidate. Generated by Claude Code |
7b68d7b to
5a5c155
Compare
|
Addressed all three triage points:
|
5a5c155 to
0915bf5
Compare
…to the integration Already here: our store reads the dmask's channels in order and writes the others as 0 with the full write mask the validator asks of typed stores, so the code stays ours. The PR's test is taken and passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
|
Hardware result: tested at head 0915bf5. One host: RTX 3080 Ti, driver 621.24, Windows 11, a fork stacking open PRs, Series X mode. Cherry-picked together with #2816 and #2831: the shader tests pass apart from one failure the stack had before (a view heap cap test), and one 7-minute run in play had no device removal. Offline refused containers across the three went from 214 to 213 (not attributed to one PR). On the stack, the added test needed the stack's extra Ran with AI assistance (Claude Code). |
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)