Shaders: lower RDNA2 POPS pixel shaders as ROVs #158
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/158"
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 Zettrox/ztrx. Originally posted by IAmTheSween on 2026-11-25T16:02:35Z.
Lowers RDNA2 POPS (Primitive Ordered Pixel Shading) wait sections in pixel shaders to host DXIL Rasterizer Ordered Views (
IsROV).What is in it
crates/victory-shader/src/emit/lower.rs:s_sendmsgMSG_ORDERED_PS_DONE(imm & 0xF == 7) and locate the entry SGPR reachings_setreg_b32 hwreg(HW_REG_POPS_PACKER, ...)(find_pops_sgpr).0for that POPS wave-overlap SGPR and forsrc_pops_exiting_wave_id(Operand::Const(239)) in POPS pixel shaders so the RDNA2 POPS conflict check resolves as non-blocking (bit 31 clear) and leaves other shaders'"a hardware SGPR input"/ special-operand checks untouched.IsROV(0x2000) so the host GPU enforces pixel-order mutual exclusion in hardware.pops_pixel_wait_lowers_and_validatesincrates/victory-shader/src/emit/mod.rsverifying both that non-POPS shaders still reject unknown hardware SGPR inputs and that POPS pixel shaders lower and validate viadxil.dll.Tested
dxil.dll10.0.26100.0:cargo test -p victory-shader --locked --lib pops_pixel_wait: 1 passed, 0 failed.cargo clippy --workspace --all-targets --locked -- -D warnings: 0 warnings.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: 0 warnings.cargo test --workspace --locked -- --test-threads=1(--test-threads=1due to WARP contention documented invalu_tests.rs:198): 497 passed, 0 failed, 7 ignored (4 invictory_formats, 1 invictory_gpu, 2 invictory_shader).victory --release translate --validateonshaders.rpf: 0 remainingemit: a hardware SGPR inputerrors across all 26,084 programs (all 10PS_PedTexturedCutOutTint_Zeroshaders now emit and passdxil.dllvalidation:14166 emitted,14055 validatedof14247VP programs, up from14156 emitted,14045 validatedonmain); also verified D3D12 PSO creation on#aafcf40b30b9df18and#09cee52e3ebbdf51.AI use
Written with Antigravity.
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.