Mesa (main): anv/android: Pass the correct pointer type to vk_errorf
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 12 00:22:58 UTC 2021
Module: Mesa
Branch: main
Commit: 16a9cf69151ace3a36e10ff8db33b07fa7484d5e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16a9cf69151ace3a36e10ff8db33b07fa7484d5e
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Tue Aug 10 17:48:32 2021 -0500
anv/android: Pass the correct pointer type to vk_errorf
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308>
---
src/intel/vulkan/anv_android.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c
index fec5c58a4a7..2f337e69e62 100644
--- a/src/intel/vulkan/anv_android.c
+++ b/src/intel/vulkan/anv_android.c
@@ -472,7 +472,8 @@ anv_image_from_gralloc(VkDevice device_h,
};
if (gralloc_info->handle->numFds != 1) {
- return vk_errorf(device, device, VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ return vk_errorf(device, &device->vk.base,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"VkNativeBufferANDROID::handle::numFds is %d, "
"expected 1", gralloc_info->handle->numFds);
}
@@ -498,7 +499,7 @@ anv_image_from_gralloc(VkDevice device_h,
0 /* client_address */,
&bo);
if (result != VK_SUCCESS) {
- return vk_errorf(device, device, result,
+ return vk_errorf(device, &device->vk.base, result,
"failed to import dma-buf from VkNativeBufferANDROID");
}
@@ -514,12 +515,14 @@ anv_image_from_gralloc(VkDevice device_h,
anv_info.isl_tiling_flags = ISL_TILING_Y0_BIT;
break;
case -1:
- result = vk_errorf(device, device, VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ result = vk_errorf(device, &device->vk.base,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"DRM_IOCTL_I915_GEM_GET_TILING failed for "
"VkNativeBufferANDROID");
goto fail_tiling;
default:
- result = vk_errorf(device, device, VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ result = vk_errorf(device, &device->vk.base,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"DRM_IOCTL_I915_GEM_GET_TILING returned unknown "
"tiling %d for VkNativeBufferANDROID", i915_tiling);
goto fail_tiling;
@@ -552,7 +555,8 @@ anv_image_from_gralloc(VkDevice device_h,
mem_reqs.memoryRequirements.alignment);
if (bo->size < aligned_image_size) {
- result = vk_errorf(device, device, VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ result = vk_errorf(device, &device->vk.base,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"dma-buf from VkNativeBufferANDROID is too small for "
"VkImage: %"PRIu64"B < %"PRIu64"B",
bo->size, aligned_image_size);
@@ -606,7 +610,7 @@ format_supported_with_usage(VkDevice device_h, VkFormat format,
result = anv_GetPhysicalDeviceImageFormatProperties2(phys_dev_h,
&image_format_info, &image_format_props);
if (result != VK_SUCCESS) {
- return vk_errorf(device, device, result,
+ return vk_errorf(device, &device->vk.base, result,
"anv_GetPhysicalDeviceImageFormatProperties2 failed "
"inside %s", __func__);
}
@@ -645,7 +649,7 @@ setup_gralloc0_usage(struct anv_device *device, VkFormat format,
* gralloc swapchains.
*/
if (imageUsage != 0) {
- return vk_errorf(device, device, VK_ERROR_FORMAT_NOT_SUPPORTED,
+ return vk_errorf(device, &device->vk.base, VK_ERROR_FORMAT_NOT_SUPPORTED,
"unsupported VkImageUsageFlags(0x%x) for gralloc "
"swapchain", imageUsage);
}
More information about the mesa-commit
mailing list