DXIL lowering can reuse one static sampler slot for both Sample and SampleCmp #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?
Imported from fxceless/victory-fork. Originally posted by Bennet0k on 2026-11-24T23:00:06Z.
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.