diff --git a/src/Tests.cpp b/src/Tests.cpp index bd498b7..0f1392e 100644 --- a/src/Tests.cpp +++ b/src/Tests.cpp @@ -1158,7 +1158,7 @@ static void RecreateAllocationResource(AllocInfo& allocation) // Just to silence validation layer warnings. VkMemoryRequirements vkMemReq; vkGetBufferMemoryRequirements(g_hDevice, allocation.m_Buffer, &vkMemReq); - TEST(vkMemReq.size == allocation.m_BufferInfo.size); + TEST(vkMemReq.size >= allocation.m_BufferInfo.size); res = vkBindBufferMemory(g_hDevice, allocation.m_Buffer, allocInfo.deviceMemory, allocInfo.offset); TEST(res == VK_SUCCESS); diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index b50ed60..35ea532 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -8329,7 +8329,7 @@ bool VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible( } } - return !typeConflictFound || minAlignment >= bufferImageGranularity; + return typeConflictFound || minAlignment >= bufferImageGranularity; } ////////////////////////////////////////////////////////////////////////////////