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:

committed by
Marge Bot

parent
279fe1ae6d
commit
16a9cf6915
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user