mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 01:08:31 +00:00
extension enabled
This commit is contained in:
parent
c9b2a6a465
commit
2683cfedc5
2 changed files with 52 additions and 6 deletions
|
@ -69,6 +69,7 @@ bool VK_KHR_buffer_device_address_enabled = false;
|
|||
bool VK_EXT_memory_priority_enabled = false;
|
||||
bool VK_EXT_debug_utils_enabled = false;
|
||||
bool VK_KHR_maintenance5_enabled = false;
|
||||
bool VK_KHR_external_memory_win32_enabled = false;
|
||||
bool g_SparseBindingEnabled = false;
|
||||
|
||||
// # Pointers to functions from extensions
|
||||
|
@ -1449,6 +1450,7 @@ static void PrintEnabledFeatures()
|
|||
}
|
||||
wprintf(L"VK_EXT_memory_priority: %d\n", VK_EXT_memory_priority_enabled ? 1 : 0);
|
||||
wprintf(L"VK_KHR_maintenance5: %d\n", VK_KHR_maintenance5_enabled? 1 : 0);
|
||||
wprintf(L"VK_KHR_external_memory_win32: %d\n", VK_KHR_external_memory_win32_enabled ? 1 : 0);
|
||||
}
|
||||
|
||||
void SetAllocatorCreateInfo(VmaAllocatorCreateInfo& outInfo)
|
||||
|
@ -1494,6 +1496,11 @@ void SetAllocatorCreateInfo(VmaAllocatorCreateInfo& outInfo)
|
|||
outInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT;
|
||||
}
|
||||
|
||||
if(VK_KHR_external_memory_win32_enabled)
|
||||
{
|
||||
outInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT;
|
||||
}
|
||||
|
||||
if(USE_CUSTOM_CPU_ALLOCATION_CALLBACKS)
|
||||
{
|
||||
outInfo.pAllocationCallbacks = &g_CpuAllocationCallbacks;
|
||||
|
@ -1876,6 +1883,8 @@ static void InitializeApplication()
|
|||
VK_EXT_memory_priority_enabled = true;
|
||||
else if(strcmp(physicalDeviceExtensionProperties[i].extensionName, VK_KHR_MAINTENANCE_5_EXTENSION_NAME) == 0)
|
||||
VK_KHR_maintenance5_enabled = true;
|
||||
else if (strcmp(physicalDeviceExtensionProperties[i].extensionName, VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME) == 0)
|
||||
VK_KHR_external_memory_win32_enabled = true;
|
||||
}
|
||||
|
||||
if(GetVulkanApiVersion() >= VK_API_VERSION_1_2)
|
||||
|
@ -2036,6 +2045,8 @@ static void InitializeApplication()
|
|||
enabledDeviceExtensions.push_back(VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME);
|
||||
if(VK_KHR_maintenance5_enabled)
|
||||
enabledDeviceExtensions.push_back(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
|
||||
if (VK_KHR_external_memory_win32_enabled)
|
||||
enabledDeviceExtensions.push_back(VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME);
|
||||
|
||||
VkPhysicalDeviceFeatures2 deviceFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 };
|
||||
deviceFeatures.features.samplerAnisotropy = VK_TRUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue