diff options
| author | Robin Kertels <robin.kertels@gmail.com> | 2022-10-29 09:49:03 +0200 |
|---|---|---|
| committer | Robin Kertels <robin.kertels@gmail.com> | 2022-10-29 23:39:27 +0200 |
| commit | 22fecb41fc85f3c2ef6a3f1e1d422dd6b6e9a76b (patch) | |
| tree | fc7c7c27c64ef9781c3324d0be938467633cc841 /Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp | |
| parent | 0716fa3c52063c444d352f65a159da77b9ce9bd8 (diff) | |
VideoBackends:D3D12: Don't query GPU descriptor handle for non-shader visible heap
Fixes the following error in the D3D12 debug layer:
D3D12 ERROR: ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart:
GetGPUDescriptorHandleForHeapStart is invalid to call on a descriptor
heap that does not have DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE set.
If the heap is not supposed to be shader visible, then
GetCPUDescriptorHandleForHeapStart would be the appropriate method
to call. That call is valid both for shader visible and non shader
visible descriptor heaps.
[ STATE_GETTING ERROR #1315: DESCRIPTOR_HEAP_NOT_SHADER_VISIBLE]
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp b/Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp index 97d0c8ce2e..9827057626 100644 --- a/Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp +++ b/Source/Core/VideoBackends/D3D12/DescriptorHeapManager.cpp @@ -25,7 +25,6 @@ bool DescriptorHeapManager::Create(ID3D12Device* device, D3D12_DESCRIPTOR_HEAP_T return false; m_heap_base_cpu = m_descriptor_heap->GetCPUDescriptorHandleForHeapStart(); - m_heap_base_gpu = m_descriptor_heap->GetGPUDescriptorHandleForHeapStart(); m_num_descriptors = num_descriptors; m_descriptor_increment_size = device->GetDescriptorHandleIncrementSize(type); @@ -60,7 +59,7 @@ bool DescriptorHeapManager::Allocate(DescriptorHandle* handle) handle->index = index; handle->cpu_handle.ptr = m_heap_base_cpu.ptr + index * m_descriptor_increment_size; - handle->gpu_handle.ptr = m_heap_base_gpu.ptr + index * m_descriptor_increment_size; + handle->gpu_handle.ptr = 0; return true; } |
