git.s-ol.nu ~forks/DiligentCore / 1e6e1d2
Fixed gcc/clang errors assiduous 7 months ago
3 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
4242 template <typename T>
4343 void HashCombine(std::size_t& Seed, const T& Val)
4444 {
45 Seed ^= std::hash<T>()(Val) + 0x9e3779b9 + (Seed << 6) + (Seed >> 2);
45 Seed ^= std::hash<T>{}(Val) + 0x9e3779b9 + (Seed << 6) + (Seed >> 2);
4646 }
4747
4848 template <typename FirstArgType, typename... RestArgsType>
700700 const auto& Res = m_Desc.Resources[i];
701701 const auto& Attr = m_pResourceAttribs[i];
702702
703 HashCombine(Hash, Res.ArraySize, Res.ShaderStages, Res.VarType, Attr.GetDescriptorType(), Attr.BindingIndex, Attr.DescrSet, Attr.IsImmutableSamplerAssigned());
703 HashCombine(Hash, Res.ArraySize, Uint32{Res.ShaderStages}, Uint32{Res.VarType}, static_cast<Uint32>(Attr.GetDescriptorType()),
704 Attr.BindingIndex, Attr.DescrSet, Attr.IsImmutableSamplerAssigned());
704705 }
705706
706707 for (Uint32 i = 0; i < m_Desc.NumImmutableSamplers; ++i)
707708 {
708 HashCombine(Hash, m_Desc.ImmutableSamplers[i].ShaderStages, m_Desc.ImmutableSamplers[i].Desc);
709 HashCombine(Hash, Uint32{m_Desc.ImmutableSamplers[i].ShaderStages}, m_Desc.ImmutableSamplers[i].Desc);
709710 }
710711
711712 return Hash;
736736 {
737737 struct UniqueResource
738738 {
739 SPIRVShaderResourceAttribs const* Attribs = nullptr;
740 Uint32 DescIndex = ~0u;
739 const SPIRVShaderResourceAttribs* const Attribs;
740 const Uint32 DescIndex;
741741 };
742742 using ResourceNameToIndex_t = std::unordered_map<HashMapStringKey, UniqueResource, HashMapStringKey::Hasher>;
743743