mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 09:18:34 +00:00
Add functions vmaBindBufferMemory2, vmaBindImageMemory2, flag VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT
This change adds usage of VK_KHR_bind_memory2 extension. Also add structure members VmaVulkanFunctions::vkBindBufferMemory2KHR, vkBindImageMemory2KHR.
This commit is contained in:
parent
1f84f62a85
commit
4abe30c1ae
14 changed files with 590 additions and 192 deletions
|
@ -47,6 +47,7 @@ bool g_MemoryAliasingWarningEnabled = true;
|
|||
static bool g_EnableValidationLayer = true;
|
||||
static bool VK_KHR_get_memory_requirements2_enabled = false;
|
||||
static bool VK_KHR_dedicated_allocation_enabled = false;
|
||||
static bool VK_KHR_bind_memory2_enabled = false;
|
||||
bool g_SparseBindingEnabled = false;
|
||||
|
||||
static HINSTANCE g_hAppInstance;
|
||||
|
@ -1276,6 +1277,11 @@ static void InitializeApplication()
|
|||
enabledDeviceExtensions.push_back(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME);
|
||||
VK_KHR_dedicated_allocation_enabled = true;
|
||||
}
|
||||
else if(strcmp(properties[i].extensionName, VK_KHR_BIND_MEMORY_2_EXTENSION_NAME) == 0)
|
||||
{
|
||||
enabledDeviceExtensions.push_back(VK_KHR_BIND_MEMORY_2_EXTENSION_NAME);
|
||||
VK_KHR_bind_memory2_enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1312,6 +1318,10 @@ static void InitializeApplication()
|
|||
*/
|
||||
allocatorInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT;
|
||||
}
|
||||
if(VK_KHR_bind_memory2_enabled)
|
||||
{
|
||||
allocatorInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT;
|
||||
}
|
||||
|
||||
if(USE_CUSTOM_CPU_ALLOCATION_CALLBACKS)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue