Remove incorrect asserts from vmaCreateBuffer

Closes #102
This commit is contained in:
Adam Sawicki 2020-03-16 15:39:44 +01:00
parent 1b8bdb216e
commit 39aeff7a43

View File

@ -18080,24 +18080,6 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer(
allocator->GetBufferMemoryRequirements(*pBuffer, vkMemReq,
requiresDedicatedAllocation, prefersDedicatedAllocation);
// Make sure alignment requirements for specific buffer usages reported
// in Physical Device Properties are included in alignment reported by memory requirements.
if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT) != 0)
{
VMA_ASSERT(vkMemReq.alignment %
allocator->m_PhysicalDeviceProperties.limits.minTexelBufferOffsetAlignment == 0);
}
if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) != 0)
{
VMA_ASSERT(vkMemReq.alignment %
allocator->m_PhysicalDeviceProperties.limits.minUniformBufferOffsetAlignment == 0);
}
if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) != 0)
{
VMA_ASSERT(vkMemReq.alignment %
allocator->m_PhysicalDeviceProperties.limits.minStorageBufferOffsetAlignment == 0);
}
// 3. Allocate memory using allocator.
res = allocator->AllocateMemory(
vkMemReq,