@@ -1028,23 +1028,25 @@ DECLARE_REFLECTION_STRUCT(AspectSparseTable);
1028
1028
1029
1029
struct DescriptorUniquenessKey
1030
1030
{
1031
- DescriptorUniquenessKey (VkImageLayout layout)
1032
- : layout(layout), offset(0 ), size(0 ), fmt(VK_FORMAT_UNDEFINED)
1031
+ DescriptorUniquenessKey (VkImageLayout layout, VkDescriptorType type )
1032
+ : layout(layout), offset(0 ), size(0 ), fmt(VK_FORMAT_UNDEFINED), type(type)
1033
1033
{
1034
1034
}
1035
- DescriptorUniquenessKey (uint64_t offset, uint64_t size, VkFormat fmt)
1036
- : layout(VK_IMAGE_LAYOUT_UNDEFINED), offset(offset), size(size), fmt(fmt)
1035
+ DescriptorUniquenessKey (uint64_t offset, uint64_t size, VkFormat fmt, VkDescriptorType type )
1036
+ : layout(VK_IMAGE_LAYOUT_UNDEFINED), offset(offset), size(size), fmt(fmt), type(type)
1037
1037
{
1038
1038
}
1039
1039
1040
1040
bool operator ==(const DescriptorUniquenessKey &key) const
1041
1041
{
1042
- return layout == key.layout && offset == key.offset && size == key.size && fmt == key.fmt ;
1042
+ return layout == key.layout && offset == key.offset && size == key.size && fmt == key.fmt &&
1043
+ type == key.type ;
1043
1044
}
1044
1045
1045
1046
VkImageLayout layout;
1046
1047
uint64_t offset, size;
1047
1048
VkFormat fmt;
1049
+ VkDescriptorType type;
1048
1050
};
1049
1051
1050
1052
namespace std
@@ -1058,6 +1060,7 @@ struct hash<DescriptorUniquenessKey>
1058
1060
hash ^= std::hash<uint64_t >()(key.offset ) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
1059
1061
hash ^= std::hash<uint64_t >()(key.size ) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
1060
1062
hash ^= std::hash<uint32_t >()(key.fmt ) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
1063
+ hash ^= std::hash<uint32_t >()(key.type ) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
1061
1064
return hash;
1062
1065
}
1063
1066
};
0 commit comments