Merge pull request #214 from yaoyao-cn/fix0

fix crash in VmaAllocator_T::AllocateDedicatedMemory
This commit is contained in:
Adam Sawicki 2021-12-07 10:04:51 +01:00 committed by GitHub
commit 7df5ecf6e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15493,9 +15493,9 @@ VkResult VmaAllocator_T::AllocateDedicatedMemory(
allocInfo.allocationSize = size;
#if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000
VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR };
if(!canAliasMemory)
{
VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR };
if(m_UseKhrDedicatedAllocation || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
{
if(dedicatedBuffer != VK_NULL_HANDLE)