From 1e6e1d278f602601cb772f421b0ec95bf25ecf4a Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 1 Feb 2021 13:49:50 -0800 Subject: Fixed gcc/clang errors --- .../GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp | 5 +++-- Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') 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(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; -- cgit v1.2.3