summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-02-01 21:49:50 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-02-01 22:32:05 +0000
commit1e6e1d278f602601cb772f421b0ec95bf25ecf4a (patch)
tree3be08ae7f8bc0322df3c4ad517db2f42e664d241 /Graphics/GraphicsEngineVulkan
parentBacicMath.hpp: fixed clang/gcc build issue (diff)
downloadDiligentCore-1e6e1d278f602601cb772f421b0ec95bf25ecf4a.tar.gz
DiligentCore-1e6e1d278f602601cb772f421b0ec95bf25ecf4a.zip
Fixed gcc/clang errors
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp5
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp
index 35acdd17..ae8d2a5b 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp
@@ -701,12 +701,13 @@ size_t PipelineResourceSignatureVkImpl::CalculateHash() const
const auto& Res = m_Desc.Resources[i];
const auto& Attr = m_pResourceAttribs[i];
- HashCombine(Hash, Res.ArraySize, Res.ShaderStages, Res.VarType, Attr.GetDescriptorType(), Attr.BindingIndex, Attr.DescrSet, Attr.IsImmutableSamplerAssigned());
+ HashCombine(Hash, Res.ArraySize, Uint32{Res.ShaderStages}, Uint32{Res.VarType}, static_cast<Uint32>(Attr.GetDescriptorType()),
+ Attr.BindingIndex, Attr.DescrSet, Attr.IsImmutableSamplerAssigned());
}
for (Uint32 i = 0; i < m_Desc.NumImmutableSamplers; ++i)
{
- HashCombine(Hash, m_Desc.ImmutableSamplers[i].ShaderStages, m_Desc.ImmutableSamplers[i].Desc);
+ HashCombine(Hash, Uint32{m_Desc.ImmutableSamplers[i].ShaderStages}, m_Desc.ImmutableSamplers[i].Desc);
}
return Hash;
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index 9aab9c2d..8d884c85 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -737,8 +737,8 @@ void PipelineStateVkImpl::InitPipelineLayout(const PipelineStateCreateInfo& Crea
{
struct UniqueResource
{
- SPIRVShaderResourceAttribs const* Attribs = nullptr;
- Uint32 DescIndex = ~0u;
+ const SPIRVShaderResourceAttribs* const Attribs;
+ const Uint32 DescIndex;
};
using ResourceNameToIndex_t = std::unordered_map<HashMapStringKey, UniqueResource, HashMapStringKey::Hasher>;