summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorazhirnov <zh1dron@gmail.com>2020-10-08 19:14:06 +0000
committerazhirnov <zh1dron@gmail.com>2020-10-08 19:36:02 +0000
commit998165f350cfd8ae6bd9cbf6fc812874c1c3c3da (patch)
tree39e748a9f09b7bc3b187c4061e19313eb8e42626 /Graphics/GraphicsEngineD3D12
parentSome minor fixes (diff)
downloadDiligentCore-998165f350cfd8ae6bd9cbf6fc812874c1c3c3da.tar.gz
DiligentCore-998165f350cfd8ae6bd9cbf6fc812874c1c3c3da.zip
Revert some changes in ShaderResourceLayoutVk, fixed PSO comparison
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.hpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.hpp b/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.hpp
index e043cf4a..5426d98b 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.hpp
@@ -273,6 +273,8 @@ public:
SHADER_TYPE GetShaderType() const { return m_pResources->GetShaderType(); }
+ const ShaderResourcesD3D12& GetResources() const { return *m_pResources; }
+
private:
const D3D12Resource& GetAssignedSampler(const D3D12Resource& TexSrv) const;
D3D12Resource& GetAssignedSampler(const D3D12Resource& TexSrv);
diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
index d5958ea8..3e8673d5 100644
--- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
@@ -489,14 +489,14 @@ bool PipelineStateD3D12Impl::IsCompatibleWith(const IPipelineState* pPSO) const
IsCompatibleShaders = false;
break;
}
- // AZ TODO
- /*const ShaderResourcesD3D12* pRes0 = pShader0->GetShaderResources().get();
- const ShaderResourcesD3D12* pRes1 = pShader1->GetShaderResources().get();
- if (!pRes0->IsCompatibleWith(*pRes1))
+
+ const auto& Res0 = GetShaderResLayout(s).GetResources();
+ const auto& Res1 = pPSOD3D12->GetShaderResLayout(s).GetResources();
+ if (!Res0.IsCompatibleWith(Res1))
{
IsCompatibleShaders = false;
break;
- }*/
+ }
}
}