shader: lower masked pixel resource-selection loops in the direct DXIL frontend #3212
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3212
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?
@R0Y00 on GitHub · 2026-11-27 21:47 UTC · original
Refs #2413 and #3074. The fixed mesh pixel path needs safe control flow when EXEC-partitioned resource selection introduces backward SCC edges. Existing projections cover forward arms. Keep explicit refusals for loops whose resource identity, forward progress, active lanes, or scalar values at exit cannot be established.
Use a source-built gfx1013 fixture with lanes selecting distinct descriptors, repeated indices, an empty arm, and an implicit-LOD sample whose helper lane matters. Validate generated DXIL, read back color against independent expected values, and add a negative control for an unproven backedge or side effect. Report exception cases and any hardware-only validation. PR target:
main.github-bot referenced this issue2026-11-27 22:03:22 +00:00
github-bot referenced this issue2026-11-27 22:16:46 +00:00
@RonLogic on GitHub · 2026-11-27 23:23 UTC · original
I’ll take this on
main. I’ll start from a source-built bounded resource-selection loop with repeated indices and an empty selection, then verify its direct DXIL and fenced colors on the RTX 4070 and WARP. The helper-lane witness will use an implicit gradient, and the refusal control will exercise a backedge without a proven decrease in the pending mask.@RonLogic on GitHub · 2026-11-27 23:46 UTC · original
The fixed-mesh heap path is already implemented in #3091. I verified its
a48d39dccompiler with a separate source-built shader. Mixed and empty selections passed for both guest widths on RTX 4070 and WARP, and the helper-only coordinate control selected the wrong mip at (6,0) on both, as intended. The no-progress backedge was refused.I reported one additional edge case and a tested guard in the #3091 review. The guard rejects implicit samples whose outputs can overwrite a later iteration's gradient inputs. I also have a verified bound-table variant on
mainfor ordinary pixel shaders with a small finite SRV key. I’m keeping that change local while #3091 is open since both touch the same lowering.@Leyukaka on GitHub · 2026-11-28 21:39 UTC · original
@RonLogic, #3091 merged at 13:48 UTC. Is the bound-table variant for ordinary pixel shaders that you kept local still coming? If you have dropped it, I can take it.
@Leyukaka on GitHub · 2026-12-02 05:33 UTC · original
@RonLogic, there has been no reply to my 11-28 question, so I took the remaining bound-table variant for ordinary pixel shaders: #3825
It reuses the #3091 waterfall detector and accepts a descriptor load from a bound root table. The fixed-mesh heap path is unchanged. The PR includes the DXIL checks, the refusals and a color readback on WARP and hardware with repeated and empty selections and an implicit-LOD sample.
If you still have your local version, I'm happy to compare the two or to add any case yours covers and mine does not.