Protection against incorrect (0 or very large) memory budget returned by some bugged drivers
2 other minor fixes.
diff --git a/src/VulkanSample.cpp b/src/VulkanSample.cpp
index 39961ec..ccab048 100644
--- a/src/VulkanSample.cpp
+++ b/src/VulkanSample.cpp
@@ -1163,7 +1163,8 @@
outInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT;
}
#if !defined(VMA_MEMORY_BUDGET) || VMA_MEMORY_BUDGET == 1
- if(VK_EXT_memory_budget_enabled && VK_KHR_get_physical_device_properties2_enabled)
+ if(VK_EXT_memory_budget_enabled && (
+ GetVulkanApiVersion() >= VK_API_VERSION_1_1 || VK_KHR_get_physical_device_properties2_enabled))
{
outInfo.flags |= VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT;
}