Fixed bug in VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible. Another minor fix.

This commit is contained in:
Adam Sawicki 2018-12-06 15:35:05 +01:00
parent 0eeed59309
commit 2af57d7f47
2 changed files with 2 additions and 2 deletions

View file

@ -1158,7 +1158,7 @@ static void RecreateAllocationResource(AllocInfo& allocation)
// Just to silence validation layer warnings. // Just to silence validation layer warnings.
VkMemoryRequirements vkMemReq; VkMemoryRequirements vkMemReq;
vkGetBufferMemoryRequirements(g_hDevice, allocation.m_Buffer, &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); res = vkBindBufferMemory(g_hDevice, allocation.m_Buffer, allocInfo.deviceMemory, allocInfo.offset);
TEST(res == VK_SUCCESS); TEST(res == VK_SUCCESS);

View file

@ -8329,7 +8329,7 @@ bool VmaBlockMetadata_Generic::IsBufferImageGranularityConflictPossible(
} }
} }
return !typeConflictFound || minAlignment >= bufferImageGranularity; return typeConflictFound || minAlignment >= bufferImageGranularity;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////