diff --git a/crates/xcl/src/gpu/recomp/runner.rs b/crates/xcl/src/gpu/recomp/runner.rs index 34b5c65201..647f23b356 100644 --- a/crates/xcl/src/gpu/recomp/runner.rs +++ b/crates/xcl/src/gpu/recomp/runner.rs @@ -1544,7 +1544,17 @@ fn run_in_region(dxil: &[u8], state: &KernelState, arena: &Arena) -> Result, Some(&raw_window_uav(size as u64)), h); } - list.SetDescriptorHeaps(&[Some(dh.clone())]); + // The ABI root signature directly indexes both heap types, even for tests + // whose shaders have no samplers. Bind both before setting the signature. + let sampler_heap: ID3D12DescriptorHeap = dev + .CreateDescriptorHeap(&D3D12_DESCRIPTOR_HEAP_DESC { + Type: D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, + NumDescriptors: 1, + Flags: D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, + NodeMask: 0, + }) + .map_err(e)?; + list.SetDescriptorHeaps(&[Some(dh.clone()), Some(sampler_heap.clone())]); list.SetComputeRootSignature(&gpu.rs); list.SetComputeRootUnorderedAccessView(0, io_buf.GetGPUVirtualAddress()); list.SetComputeRootUnorderedAccessView(1, res_buf.GetGPUVirtualAddress());