DXIL lowering can reuse one static sampler slot for both Sample and SampleCmp #250
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#250
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?
@Bennet0k on GitHub · 2026-11-24 23:00 UTC · original
Source
Static sampler slots are deduplicated by the four sampler words. If a shader uses the same words for a regular sample and a comparison sample, both operations share the slot and comparison use marks that slot as a comparison sampler. In comparison-first order, the ordinary sample then gets a comparison handle. In ordinary-first order, the earlier ordinary handle and final slot metadata disagree. The DXIL validator requires the sampler kind to match the operation.
Proposed fix. Include the comparison flag in the static sampler deduplication key. Add a synthetic shader with both operation orders and verify separate slots with appropriate resource annotations and static sampler kinds. Checked against the lowering code and a model of both orders. No DXIL validation or title regression is claimed here.
Found in an AI-assisted audit of
2119b0e.github-bot referenced this issue2026-11-26 03:39:42 +00:00