xshader: fetch compute samplers from the sampler heap at a run-time offset #31
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/brcly--TuxBox!31
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/31/head"
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?
@NathansDomainSolutions on GitHub · 2026-11-24 05:03 UTC · original
NathansDomainSolutions:fix/sload-dynamic-soffset→main· +38 −1 · 1 files · 1 commits · merged 2026-11-24 05:06 UTCRefs #16.
CS_RaytracingResolveand its variants pick a sampler per material:s_load_dwordx4from the directly indexed compute sampler heap (FSSM user class 6, root flags0xc00, the SamplerHeapIndexing feature bit).xshader refused these with
s_load at …: dynamic soffset unsupported.This PR translates that load as a sampler-heap index (
soff >> 4) and samples withSamplerDescriptorHeap[NonUniformResourceIndex(i)]. The static compute sampler-heap path already uses guest indices directly, and this follows the same convention. The waterfall around the load is emulated as before.Corpus check (9,102 recorded ProjectScarlett requests, host xshader built from
mainvs. this branch):s_load.cs_6_6), both optimised and at-O0, and pass DXV.cargo testfor the shader compiler passes.Not tested in game.
Most
dynamic soffsetrefusals are vertex-shaderResourceDescriptorHeapfetches, not this case. A separate change onfix/vs-resource-heaphandles those.AI disclosure: written with Claude Code; verified with the corpus diff and DXC/DXV validation above.
🤖 Generated with Claude Code