[Mesa-dev] [PATCH] anv/android: Do not reject storage images.

Tapani Pälli tapani.palli at intel.com
Wed Dec 5 10:46:51 UTC 2018



On 12/5/18 12:34 PM, Bas Nieuwenhuizen wrote:
> We do the ImageFormatProperties check already, and rejecting an usage
> flag when both ImageFormatProperties and the WSI (which is Android)
> support it is not allowed.
> 
> Intel does support storage for some of the support WSI formats, such
> as R8G8B8A8_UNORM, and looking at the ISL_SURF_USAGE_DISABLE_AUX_BIT,
> the imported images do not have any form of compression that would
> prevent this fix.

Bas FYI, we have this one used internally:

https://patchwork.freedesktop.org/patch/247681/

> 
> Fixes: 053d4c328fa "anv: Implement VK_ANDROID_native_buffer (v9)"
> CC: Jason Ekstrand <jason at jlekstrand.net>
> ---
>   src/intel/vulkan/anv_android.c | 7 -------
>   1 file changed, 7 deletions(-)
> 
> diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c
> index a3bab8087b4..92c3787b49b 100644
> --- a/src/intel/vulkan/anv_android.c
> +++ b/src/intel/vulkan/anv_android.c
> @@ -268,13 +268,6 @@ VkResult anv_GetSwapchainGrallocUsageANDROID(
>                          "inside %s", __func__);
>      }
>   
> -   /* Reject STORAGE here to avoid complexity elsewhere. */
> -   if (imageUsage & VK_IMAGE_USAGE_STORAGE_BIT) {
> -      return vk_errorf(device->instance, device, VK_ERROR_FORMAT_NOT_SUPPORTED,
> -                       "VK_IMAGE_USAGE_STORAGE_BIT unsupported for gralloc "
> -                       "swapchain");
> -   }
> -
>      if (unmask32(&imageUsage, VK_IMAGE_USAGE_TRANSFER_DST_BIT |
>                                VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT))
>         *grallocUsage |= GRALLOC_USAGE_HW_RENDER;
> 


More information about the mesa-dev mailing list