anv/android: Pass the correct pointer type to vk_errorf

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12308>
This commit is contained in:
Jason Ekstrand
2021-08-10 17:48:32 -05:00
committed by Marge Bot
parent 279fe1ae6d
commit 16a9cf6915

View File

@@ -472,7 +472,8 @@ anv_image_from_gralloc(VkDevice device_h,
}; };
if (gralloc_info->handle->numFds != 1) { 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, " "VkNativeBufferANDROID::handle::numFds is %d, "
"expected 1", gralloc_info->handle->numFds); "expected 1", gralloc_info->handle->numFds);
} }
@@ -498,7 +499,7 @@ anv_image_from_gralloc(VkDevice device_h,
0 /* client_address */, 0 /* client_address */,
&bo); &bo);
if (result != VK_SUCCESS) { 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"); "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; anv_info.isl_tiling_flags = ISL_TILING_Y0_BIT;
break; break;
case -1: 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 " "DRM_IOCTL_I915_GEM_GET_TILING failed for "
"VkNativeBufferANDROID"); "VkNativeBufferANDROID");
goto fail_tiling; goto fail_tiling;
default: 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 " "DRM_IOCTL_I915_GEM_GET_TILING returned unknown "
"tiling %d for VkNativeBufferANDROID", i915_tiling); "tiling %d for VkNativeBufferANDROID", i915_tiling);
goto fail_tiling; goto fail_tiling;
@@ -552,7 +555,8 @@ anv_image_from_gralloc(VkDevice device_h,
mem_reqs.memoryRequirements.alignment); mem_reqs.memoryRequirements.alignment);
if (bo->size < aligned_image_size) { 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 " "dma-buf from VkNativeBufferANDROID is too small for "
"VkImage: %"PRIu64"B < %"PRIu64"B", "VkImage: %"PRIu64"B < %"PRIu64"B",
bo->size, aligned_image_size); bo->size, aligned_image_size);
@@ -606,7 +610,7 @@ format_supported_with_usage(VkDevice device_h, VkFormat format,
result = anv_GetPhysicalDeviceImageFormatProperties2(phys_dev_h, result = anv_GetPhysicalDeviceImageFormatProperties2(phys_dev_h,
&image_format_info, &image_format_props); &image_format_info, &image_format_props);
if (result != VK_SUCCESS) { if (result != VK_SUCCESS) {
return vk_errorf(device, device, result, return vk_errorf(device, &device->vk.base, result,
"anv_GetPhysicalDeviceImageFormatProperties2 failed " "anv_GetPhysicalDeviceImageFormatProperties2 failed "
"inside %s", __func__); "inside %s", __func__);
} }
@@ -645,7 +649,7 @@ setup_gralloc0_usage(struct anv_device *device, VkFormat format,
* gralloc swapchains. * gralloc swapchains.
*/ */
if (imageUsage != 0) { 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 " "unsupported VkImageUsageFlags(0x%x) for gralloc "
"swapchain", imageUsage); "swapchain", imageUsage);
} }