Skip to content

Commit 2af57d7

Browse files
Fixed bug in VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible. Another minor fix.
1 parent 0eeed59 commit 2af57d7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ static void RecreateAllocationResource(AllocInfo& allocation)
11581158
// Just to silence validation layer warnings.
11591159
VkMemoryRequirements vkMemReq;
11601160
vkGetBufferMemoryRequirements(g_hDevice, allocation.m_Buffer, &vkMemReq);
1161-
TEST(vkMemReq.size == allocation.m_BufferInfo.size);
1161+
TEST(vkMemReq.size >= allocation.m_BufferInfo.size);
11621162

11631163
res = vkBindBufferMemory(g_hDevice, allocation.m_Buffer, allocInfo.deviceMemory, allocInfo.offset);
11641164
TEST(res == VK_SUCCESS);

src/vk_mem_alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8329,7 +8329,7 @@ bool VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible(
83298329
}
83308330
}
83318331

8332-
return !typeConflictFound || minAlignment >= bufferImageGranularity;
8332+
return typeConflictFound || minAlignment >= bufferImageGranularity;
83338333
}
83348334

83358335
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)