summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-10-14 08:04:05 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-10-14 08:04:05 +0000
commitb3fec8bd40e80115086281bce74774617aa95e23 (patch)
tree99c9b3250484d6a5f3283320aea8b7b90f3f30c1 /Graphics/GraphicsEngineD3D11
parentShader variable access test: fixed issue with raw buffers in GL/VK/Metal (diff)
downloadDiligentCore-b3fec8bd40e80115086281bce74774617aa95e23.tar.gz
DiligentCore-b3fec8bd40e80115086281bce74774617aa95e23.zip
Added buffer mode validation when binding buffer views
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rwxr-xr-xGraphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp
index fd6c7299..63b34f44 100755
--- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp
@@ -553,6 +553,7 @@ void ShaderResourceLayoutD3D11::BuffSRVBindInfo::BindResource(IDeviceObject* pVi
{
auto& CachedSRV = ResourceCache.GetSRV(m_Attribs.BindPoint + ArrayIndex);
VerifyResourceViewBinding(m_Attribs, GetType(), ArrayIndex, pView, pViewD3D11.RawPtr(), {BUFFER_VIEW_SHADER_RESOURCE}, CachedSRV.pView.RawPtr(), m_ParentResLayout.GetShaderName());
+ VerifyBufferViewModeD3D(pViewD3D11.RawPtr(), m_Attribs, m_ParentResLayout.GetShaderName());
}
#endif
ResourceCache.SetBufSRV(m_Attribs.BindPoint + ArrayIndex, std::move(pViewD3D11));
@@ -593,6 +594,7 @@ void ShaderResourceLayoutD3D11::BuffUAVBindInfo::BindResource(IDeviceObject* pVi
{
auto& CachedUAV = ResourceCache.GetUAV(m_Attribs.BindPoint + ArrayIndex);
VerifyResourceViewBinding(m_Attribs, GetType(), ArrayIndex, pView, pViewD3D11.RawPtr(), {BUFFER_VIEW_UNORDERED_ACCESS}, CachedUAV.pView.RawPtr(), m_ParentResLayout.GetShaderName());
+ VerifyBufferViewModeD3D(pViewD3D11.RawPtr(), m_Attribs, m_ParentResLayout.GetShaderName());
}
#endif
ResourceCache.SetBufUAV(m_Attribs.BindPoint + ArrayIndex, std::move(pViewD3D11));