summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-12-10 15:55:46 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-12-10 15:55:46 +0000
commitcf61174e91c03b19b538491b55ed3f292a5bb931 (patch)
treeeac0a1635227f16b9b64665fd886d663faf6d30e /Graphics/GraphicsEngineD3D12
parentUsing VS2019 again (diff)
downloadDiligentCore-cf61174e91c03b19b538491b55ed3f292a5bb931.tar.gz
DiligentCore-cf61174e91c03b19b538491b55ed3f292a5bb931.zip
Added shader resource layout test (works in D3D12 only for now)
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
index 5aebb084..8b16344f 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
@@ -567,9 +567,9 @@ void ShaderResourceLayoutD3D12::D3D12Resource::BindResource(IDeviceObject*
}
else if (ResourceCache.DbgGetContentType() == ShaderResourceCacheD3D12::DbgCacheContentType::SRBResources)
{
- if (GetResType() == CachedResourceType::CBV)
+ if (GetResType() == CachedResourceType::CBV && Attribs.BindCount == 1)
{
- VERIFY(ShdrVisibleHeapCPUDescriptorHandle.ptr == 0, "Constant buffers are bound as root views and should not be assigned shader visible descriptor space");
+ VERIFY(ShdrVisibleHeapCPUDescriptorHandle.ptr == 0, "Non-array constant buffers are bound as root views and should not be assigned shader visible descriptor space");
}
else
{
@@ -879,9 +879,9 @@ bool ShaderResourceLayoutD3D12::dvpVerifyBindings(const ShaderResourceCacheD3D12
}
else if (ResourceCache.DbgGetContentType() == ShaderResourceCacheD3D12::DbgCacheContentType::SRBResources)
{
- if (res.GetResType() == CachedResourceType::CBV)
+ if (res.GetResType() == CachedResourceType::CBV && res.Attribs.BindCount == 1)
{
- VERIFY(ShdrVisibleHeapCPUDescriptorHandle.ptr == 0, "Constant buffers are bound as root views and should not be assigned shader visible descriptor space");
+ VERIFY(ShdrVisibleHeapCPUDescriptorHandle.ptr == 0, "Non-array constant buffers are bound as root views and should not be assigned shader visible descriptor space");
}
else
{