Repository navigation
xshader: accept the sampler heap base in rooted pixel shaders - #157
Merged
brcly merged 1 commit intoNov 25, 2026
Merged
Conversation
A pixel shader that indexes the descriptor heaps gets the sampler heap base in the user SGPR of FSSM class 6. pixel_heap_base refused class 6 whenever a root signature was present, so fixed-offset reads from that heap were left as unmapped table descriptors and the rooted translation was refused. The runtime then fell back to the root-less translation, whose private bindings the mesh pipeline root does not provide. Accept class 6 when the root sets SAMPLER_HEAP_DIRECTLY_INDEXED (0x800), as class 5 already requires 0x400. Over 5,942 recorded rooted pixel requests: 2,786 newly translated, 0 regressions, 13 outputs changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A pixel shader that indexes the descriptor heaps receives the sampler heap base in the user SGPR named by FSSM user-data class 6 (the resource heap is class 5).
pixel_heap_baserefused class 6 whenever a root signature was present. Fixed-offset reads from the sampler heap (e.g.s16 + 0x430) then fell through to the root-table lookup, stayed unmapped, and the rooted translation was refused withunmapped descriptor at sN + 0x_ in a heap-indexing pixel shader.In ProjectScarlett this mostly hits pixel stages of mesh pipelines. When the rooted translation is refused, slot 86 falls back to the root-less pixel translation, whose private space1 bindings (e.g.
b21 space1) the mesh pipeline's root doesn't provide. vkd3d-proton rejects the pipeline withvkd3d result -3, and the draw is lost.This PR accepts class 6 when the root sets
SAMPLER_HEAP_DIRECTLY_INDEXED(0x800), as class 5 already requiresCBV_SRV_UAV_HEAP_DIRECTLY_INDEXED(0x400). An example root that triggers it: flags0xc00, FSSM user records[5, 0, 1, 0, 0xf](resource heap in s15) and[6, 0, 1, 0, 0x10](sampler heap in s16).Checks
-O0above 128 KiB).cargo testfor tools/shader-compiler (x86_64-unknown-linux-gnu): all pass.AI-assisted: written with Claude Code and reviewed by me.
🤖 Generated with Claude Code