summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-26 06:31:42 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-26 06:31:42 +0000
commit6866e442b789df5c15693c2d38ae6abc740c5bd2 (patch)
tree883c4cc8d9fa394ba0cda3a850145662b7bf53a6 /Graphics/GraphicsEngineVulkan
parentReworked IShaderResourceVariable::GetResourceDesc() method to be compatible w... (diff)
downloadDiligentCore-6866e442b789df5c15693c2d38ae6abc740c5bd2.tar.gz
DiligentCore-6866e442b789df5c15693c2d38ae6abc740c5bd2.zip
Reworked IShader::GetResource to be compatible with C; renamed the method to GetResourceDesc
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
index 6da22a8b..1fa1053c 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
@@ -60,7 +60,7 @@ public:
}
/// Implementation of IShader::GetResource() in Vulkan backend.
- virtual ShaderResourceDesc GetResource(Uint32 Index) const override final;
+ virtual void GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const override final;
/// Implementation of IShaderVk::GetSPIRV().
virtual const std::vector<uint32_t>& GetSPIRV() const override final
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
index ef570dc0..e024643a 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
@@ -145,17 +145,15 @@ ShaderVkImpl::~ShaderVkImpl()
{
}
-ShaderResourceDesc ShaderVkImpl::GetResource(Uint32 Index) const
+void ShaderVkImpl::GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const
{
auto ResCount = GetResourceCount();
DEV_CHECK_ERR(Index < ResCount, "Resource index (", Index, ") is out of range");
- ShaderResourceDesc ResourceDesc;
if (Index < ResCount)
{
const auto& SPIRVResource = m_pShaderResources->GetResource(Index);
ResourceDesc = SPIRVResource.GetResourceDesc();
}
- return ResourceDesc;
}
} // namespace Diligent