diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-12-10 15:55:46 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-12-10 15:55:46 +0000 |
| commit | cf61174e91c03b19b538491b55ed3f292a5bb931 (patch) | |
| tree | eac0a1635227f16b9b64665fd886d663faf6d30e /Graphics/GraphicsEngineD3D12 | |
| parent | Using VS2019 again (diff) | |
| download | DiligentCore-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.cpp | 8 |
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 { |
