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_android.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_android.c')
-rw-r--r-- | src/amd/vulkan/radv_android.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_android.c b/src/amd/vulkan/radv_android.c index c06c83b8ab4..f5d70825dd2 100644 --- a/src/amd/vulkan/radv_android.c +++ b/src/amd/vulkan/radv_android.c @@ -122,7 +122,7 @@ radv_image_from_gralloc(VkDevice device_h, return result; if (gralloc_info->handle->numFds != 1) { - return vk_errorf(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, + return vk_errorf(device->instance, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, "VkNativeBufferANDROID::handle::numFds is %d, " "expected 1", gralloc_info->handle->numFds); } @@ -233,7 +233,7 @@ VkResult radv_GetSwapchainGrallocUsageANDROID( result = radv_GetPhysicalDeviceImageFormatProperties2(phys_dev_h, &image_format_info, &image_format_props); if (result != VK_SUCCESS) { - return vk_errorf(result, + return vk_errorf(device->instance, result, "radv_GetPhysicalDeviceImageFormatProperties2 failed " "inside %s", __func__); } @@ -252,7 +252,7 @@ VkResult radv_GetSwapchainGrallocUsageANDROID( * gralloc swapchains. */ if (imageUsage != 0) { - return vk_errorf(VK_ERROR_FORMAT_NOT_SUPPORTED, + return vk_errorf(device->instance, VK_ERROR_FORMAT_NOT_SUPPORTED, "unsupported VkImageUsageFlags(0x%x) for gralloc " "swapchain", imageUsage); } |