summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-01-14 01:27:05 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-01-14 01:27:05 +0000
commit05362d27cef0eae217d399e8fca90396fa76ea75 (patch)
tree54199576666a71dd1ace75ce9e15f3c8e1595a42 /Graphics/GraphicsEngineD3D12
parentAdded MemoryFileStream (diff)
downloadDiligentCore-05362d27cef0eae217d399e8fca90396fa76ea75.tar.gz
DiligentCore-05362d27cef0eae217d399e8fca90396fa76ea75.zip
Fixed bug in ShaderResourceLayoutD3D12::D3D12Resource::IsBound()
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
index 4e75557c..eada5310 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
@@ -675,7 +675,9 @@ bool ShaderResourceLayoutD3D12::D3D12Resource::IsBound(Uint32 ArrayIndex, const
const auto& RootTable = ResourceCache.GetRootTable(RootIndex);
if(OffsetFromTableStart + ArrayIndex < RootTable.GetSize())
{
- const auto& CachedRes = RootTable.GetResource(OffsetFromTableStart + ArrayIndex, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, ParentResLayout.m_pResources->GetShaderType());
+ const auto& CachedRes = RootTable.GetResource(OffsetFromTableStart + ArrayIndex,
+ GetResType() == CachedResourceType::Sampler ? D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER : D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
+ ParentResLayout.m_pResources->GetShaderType());
if( CachedRes.pObject != nullptr )
{
VERIFY(CachedRes.CPUDescriptorHandle.ptr != 0 || CachedRes.pObject.RawPtr<BufferD3D12Impl>()->GetDesc().Usage == USAGE_DYNAMIC, "No relevant descriptor handle");