10 pixel programs stop with "a hardware SGPR input": they use ordered pixel shading (POPS); a translation needs rasterizer-ordered views #721
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#721
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@JRamos1993 on GitHub · 2026-11-25 05:38 UTC · original
10 pixel programs of the retail pack stop with
emit: a hardware SGPR input. All 10 use ordered pixel shading (POPS), and a faithful translation needs rasterizer-ordered views.Where:
main310c6eb, offlinevictory translate --validate --listover the title's shader pack. These are the 10 "a hardware SGPR input" programs in the census tables on #279.What the SGPR is: in all 10 it is
s18, read on entry. That is past the root signature's user data, which iss8–s16in these programs.Lower::inputshas no input for it, andinitialized_sgprsis unknown for a pixel program.What the 10 programs do with it. The pattern is the same in all 10:
s18as bitfields:s_bfe_u32of bits 0–9, 16–25 and 28–29, ands_lshr_b32 …, 31. That is the layout of the POPS collision-wave-ID SGPR: two wave IDs, the packer ID, and a flag for an overlap with earlier waves.HW_REG_POPS_PACKERwiths_setreg_b32.src_pops_exiting_wave_id, until the overlapping earlier waves have left.image_storeandimage_load … glc dlc. This is the ordered section.s_sendmsg sendmsg(MSG_ORDERED_PS_DONE).So these are read-modify-write passes that rely on per-pixel primitive order.
What a translation needs. In D3D12 terms this is rasterizer-ordered access:
RasterizerOrderedTexture2D(the DXIL resource with the ROV flag). D3D12 then orders the accesses per pixel, as the console's packer does.s18read as 0 (bit 31 clear: nothing to wait for);POPS_PACKERwrite ignored;src_pops_exiting_wave_idgiven a value that ends the loop at once;MSG_ORDERED_PS_DONEdropped.A shortcut with the prologue dropped but no ROVs would translate the 10 programs, but would leave overlapping pixels' read-modify-write unordered. That gives flicker or wrong blends where primitives overlap. It would still beat dropping the draws only if the maintainers accept that trade-off.
Not done: I have not written either version. I have not checked which views the ordered section touches beyond the instruction counts above. These programs are not reached in the scene my save gets to, so nothing was checked in game.
AI use: Claude Code with Claude Opus 5.5 found the class on the retail pack, read the programs' disassembly on my machine and wrote this. No title bytes, names or offsets are included.
@JRamos1993 on GitHub · 2026-11-25 06:11 UTC · original
Closing: #215 already lowers the ordered section as rasterizer-ordered UAVs. I missed it when I checked (I searched issues, not pull requests). Measured on the retail pack, #215 merged onto
main310c6ebvalidates all 10 of these programs and loses none: #215