diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-09-01 06:42:25 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-09-01 06:42:25 +0000 |
commit | f832fd44934ed22b8ce639237c50a1fcae9dc758 (patch) | |
tree | c999d70a9ce0b6b69855e23f709b170009eedcde /lib/mesa | |
parent | 5a9f06ca19ca6647c061aeb447ca40fe5e22e2a9 (diff) |
get available memory when assert() is disabled via NDEBUG
problem spotted by Jason Ekstrand reviewing proposed patches upstream
Diffstat (limited to 'lib/mesa')
-rw-r--r-- | lib/mesa/src/intel/vulkan/anv_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mesa/src/intel/vulkan/anv_device.c b/lib/mesa/src/intel/vulkan/anv_device.c index 37978d816..8965c168a 100644 --- a/lib/mesa/src/intel/vulkan/anv_device.c +++ b/lib/mesa/src/intel/vulkan/anv_device.c @@ -2105,7 +2105,9 @@ anv_get_memory_budget(VkPhysicalDevice physicalDevice, { ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); uint64_t sys_available; - assert(os_get_available_system_memory(&sys_available)); + ASSERTED bool has_available_memory = + os_get_available_system_memory(&sys_available); + assert(has_available_memory); VkDeviceSize total_heaps_size = 0; for (size_t i = 0; i < device->memory.heap_count; i++) |