Shaders: one sampler's words used for both Sample and SampleCmp get two static slots #333
No reviewers
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!333
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-333"
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?
@RenzoWit35 on GitHub · 2026-11-24 23:34 UTC · original
RenzoWit35:fix/250-static-sampler-kind-in-key→main· +124 −7 · 2 files · 1 commits · openFixes #250.
Immediate samplers were deduplicated by their four words alone, and a comparison use marked the
shared slot as a comparison sampler (a
shortcut:in the code). Comparison first, the ordinarysample got a comparison handle (the DXIL validator rejects it). Ordinary first, its default
handle pointed at a comparison static sampler (the validator accepts that, but it is wrong).
The slot key is now the words plus the comparison flag, and a slot's kind is set once at
creation. Lowering more than 64 immediate samplers now fails cleanly instead of overflowing the
u64 kind mask.
Test
one_samplers_words_with_and_without_comparison_get_two_slots: a synthetic GFX10 computeprogram samples with and without comparison through the same words, in both orders, and checks
two slots with the right kinds; it also runs dxil.dll's validator when present (no GPU needed).
Fails on
main.Note: affected shaders get one more static sampler in their root signature.
Testing
On Windows 11, MSVC Rust 1.98.1, branch alone on top of
main(2119b0e):cargo clippy --workspace --all-targets --locked -- -D warnings, the same with--all-features, andcargo test --workspace --lockedall pass. The new regression test fails onmainand passes here. All nine fix branches for #242-#250 also pass together when merged.🤖 Generated with Claude Code
@kaayzouee on GitHub · 2026-11-25 01:02 UTC · original
Duplicate of #276?
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.