From d8391cdeb7683230c33c666d98cba6d964046013 Mon Sep 17 00:00:00 2001 From: cindertheblue <98295944+cindertheblue@users.noreply.github.com> Date: Tue, 24 Nov 2026 16:43:14 -0800 Subject: [PATCH] Tests: the sparse VRAM test binds the heaps its root signature indexes gpu_sparse_vram_descriptors_buffers_and_xmem sets the ABI root signature, which has D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and SAMPLER_HEAP_DIRECTLY_INDEXED, without SetDescriptorHeaps first. With the debug layer on that is error 1419, twice per submit (four times per run). Bind a one-descriptor CBV/SRV/UAV heap and a sampler heap before it, on every recording, as the runner does through bind_resources. The shader reads nothing through them. Co-Authored-By: Claude Opus 5.5 --- crates/xcl/src/gpu/recomp/tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/xcl/src/gpu/recomp/tests.rs b/crates/xcl/src/gpu/recomp/tests.rs index e1f73ef48..204a3efee 100644 --- a/crates/xcl/src/gpu/recomp/tests.rs +++ b/crates/xcl/src/gpu/recomp/tests.rs @@ -3544,6 +3544,11 @@ fn gpu_sparse_vram_descriptors_buffers_and_xmem() { let alloc: ID3D12CommandAllocator = dev.CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT).unwrap(); let list: ID3D12GraphicsCommandList = dev.CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, &alloc, Some(&pso)).unwrap(); let fence: ID3D12Fence = dev.CreateFence(0, D3D12_FENCE_FLAG_NONE).unwrap(); + // The ABI root signature indexes both heaps directly, so they must be bound before it. + let heap = |ty| -> ID3D12DescriptorHeap { + dev.CreateDescriptorHeap(&D3D12_DESCRIPTOR_HEAP_DESC { Type: ty, NumDescriptors: 1, Flags: D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, NodeMask: 0 }).unwrap() + }; + let heaps = [Some(heap(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV)), Some(heap(D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER))]; // User SGPRs: s[0:1] = 64-bit arg_table (Window 3), s4 = 32-bit descriptor table offset in Window 0 let mut io = vec![0u32; crate::gpu::recomp::KERNEL_SGPRS]; @@ -3559,6 +3564,7 @@ fn gpu_sparse_vram_descriptors_buffers_and_xmem() { alloc.Reset().unwrap(); list.Reset(&alloc, Some(&pso)).unwrap(); } + list.SetDescriptorHeaps(&heaps); list.SetComputeRootSignature(&rs); list.SetComputeRootUnorderedAccessView(0, crate::hle::d3d12x::real::uma_va_of(io_buf).unwrap()); list.SetComputeRootUnorderedAccessView(1, crate::hle::d3d12x::real::uma_va_of(res_buf).unwrap());