vk: Fix broken bound object comparison

This commit is contained in:
kd-11
2025-10-17 17:12:47 +03:00
committed by kd-11
parent 0d1a05ecd1
commit c4fba680d1
2 changed files with 12 additions and 3 deletions
+10 -2
View File
@@ -17,13 +17,21 @@ namespace vk
bool operator == (const descriptor_slot_t& a, const VkDescriptorImageInfoEx& b)
{
const auto ptr = std::get_if<VkDescriptorImageInfoEx>(&a);
return !!ptr && ptr->resourceId == b.resourceId;
return !!ptr &&
ptr->resourceId == b.resourceId &&
ptr->imageView == b.imageView &&
ptr->sampler == b.sampler &&
ptr->imageLayout == b.imageLayout;
}
bool operator == (const descriptor_slot_t& a, const VkDescriptorBufferInfoEx& b)
{
const auto ptr = std::get_if<VkDescriptorBufferInfoEx>(&a);
return !!ptr && ptr->resourceId == b.resourceId;
return !!ptr &&
ptr->resourceId == b.resourceId &&
ptr->buffer == b.buffer &&
ptr->offset == b.offset &&
ptr->range == b.range;
}
bool operator == (const descriptor_slot_t& a, const VkDescriptorBufferViewEx& b)
+2 -1
View File
@@ -5,7 +5,8 @@ namespace vk
{
static atomic_t<u64> s_resource_uid;
u64 gen_uid() {
u64 gen_uid()
{
return s_resource_uid++;
}
}