Prevent misidentification of sampler heap in ray patching. Closes #3821

This commit is contained in:
baldurk
2026-04-10 11:38:05 +01:00
parent 48aa91d6c9
commit 3c5a63f2a1
+3 -3
View File
@@ -804,7 +804,7 @@ void D3D12RTManager::Verify(PatchedRayDispatch &r)
(WrappedID3D12DescriptorHeap *)m_wrappedDevice->GetResourceManager()
->GetResAs<ID3D12DescriptorHeap>(heapId);
if(heap->GetDescriptors()->GetType() == D3D12DescriptorType::Sampler)
if(heap->GetDesc().Type == D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER)
sampHeap = heap;
else
resHeap = heap;
@@ -1690,7 +1690,7 @@ PatchedRayDispatch D3D12RTManager::PatchRayDispatch(ID3D12GraphicsCommandList4 *
(WrappedID3D12DescriptorHeap *)m_wrappedDevice->GetResourceManager()
->GetResAs<ID3D12DescriptorHeap>(heapId);
if(heap->GetDescriptors()->GetType() == D3D12DescriptorType::Sampler)
if(heap->GetDesc().Type == D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER)
{
cbufferData.wrapped_sampHeapBase = heap->GetOriginalGPUBase();
cbufferData.unwrapped_sampHeapBase = heap->GetGPU(0).ptr;
@@ -1959,7 +1959,7 @@ PatchedRayDispatch D3D12RTManager::PatchIndirectRayDispatch(
(WrappedID3D12DescriptorHeap *)m_wrappedDevice->GetResourceManager()
->GetResAs<ID3D12DescriptorHeap>(heapId);
if(heap->GetDescriptors()->GetType() == D3D12DescriptorType::Sampler)
if(heap->GetDesc().Type == D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER)
{
cbufferData.wrapped_sampHeapBase = heap->GetOriginalGPUBase();
cbufferData.unwrapped_sampHeapBase = heap->GetGPU(0).ptr;