summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
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;
- }*/
+ }
}
}