diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-05-31 01:06:41 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-05-31 11:51:23 +0200 |
commit | 38933c11514696505e49fd8036ebd1d1e62fa6ec (patch) | |
tree | 829a3ff8410c47d48761ce20214e94a9e07b3cb3 /src/amd/vulkan/radv_query.c | |
parent | 729f7373deaf98d860ef95be36ef8af267218bc3 (diff) |
radv: Add option to print errors even in optimized builds.
Errors are not that common of a case so we can eat a slight perf
hit in having to call a function and do a runtime check.
In turn this makes debugging random errors happening for end users
easier, because they don't have to have a debug build on hand.
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_query.c')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 3749e2f43d1..f30796446d9 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -753,7 +753,7 @@ VkResult radv_CreateQueryPool( VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (!pool) - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY); switch(pCreateInfo->queryType) { @@ -783,7 +783,7 @@ VkResult radv_CreateQueryPool( if (!pool->bo) { vk_free2(&device->alloc, pAllocator, pool); - return vk_error(VK_ERROR_OUT_OF_DEVICE_MEMORY); + return vk_error(device->instance, VK_ERROR_OUT_OF_DEVICE_MEMORY); } pool->ptr = device->ws->buffer_map(pool->bo); @@ -791,7 +791,7 @@ VkResult radv_CreateQueryPool( if (!pool->ptr) { device->ws->buffer_destroy(pool->bo); vk_free2(&device->alloc, pAllocator, pool); - return vk_error(VK_ERROR_OUT_OF_DEVICE_MEMORY); + return vk_error(device->instance, VK_ERROR_OUT_OF_DEVICE_MEMORY); } memset(pool->ptr, 0, pool->size); |