From 71c7c8546cae107793b2ee0998e67b5b66a42740 Mon Sep 17 00:00:00 2001 From: NathansDomainSolutions <184714143+NathansDomainSolutions@users.noreply.github.com> Date: Wed, 25 Nov 2026 00:48:23 -0900 Subject: [PATCH] xshader: accept the sampler heap base in rooted pixel shaders 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 --- tools/shader-compiler/src/hlsl.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/shader-compiler/src/hlsl.rs b/tools/shader-compiler/src/hlsl.rs index 298ac10..425827d 100644 --- a/tools/shader-compiler/src/hlsl.rs +++ b/tools/shader-compiler/src/hlsl.rs @@ -9641,7 +9641,10 @@ fn pixel_heap_base(ex: &ShaderExtract, class: u32) -> Option { return None; } if let Some(root) = ex.root_sig.as_ref() { - if class != 5 || root.flags & 0x400 == 0 || sampler_heap::resource_base(ex).is_some() { + // Class 5 needs CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED (0x400), class 6 + // SAMPLER_HEAP_DIRECTLY_INDEXED (0x800). + let indexed = match class { 5 => root.flags & 0x400 != 0, 6 => root.flags & 0x800 != 0, _ => false }; + if !indexed || sampler_heap::resource_base(ex).is_some() { return None; } }