[Mesa-stable] [Mesa-dev] [PATCH 5/7] i965/screen: Don't advertise support for RG formats

Jason Ekstrand jason at jlekstrand.net
Wed Jun 6 19:42:21 UTC 2018


On June 6, 2018 12:37:58 Daniel Stone <daniel at fooishbar.org> wrote:
> Right, it's a feature we use, because we do all import them as separate 
> EGLImages ... and we won't if it's not advertised.


I'm a bit skeptical given that it doesn't actually work today because the 
DRI format to Mesa format conversation function doesn't handle R it RG 
formats today.  Maybe it goes through some other path?

In any case, I'm happy to drop this patch in favor of Lionel's patch to 
make the DRI format to Mesa format conversation function actually work for 
these formats.

--Jason


>
> On Wed, 6 Jun 2018, 7:05 pm Jason Ekstrand, <jason at jlekstrand.net> wrote:
> On Wed, Jun 6, 2018 at 11:03 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Wed, Jun 6, 2018 at 11:00 AM, Daniel Stone <daniel at fooishbar.org> wrote:
> Sorry, but as written this will regress ability to import NV12 images as 
> separately-addressed planes with shader conversion to RGB; Kodi, Mutter and 
> Weston all use this.
>
> I don't believe it will.  It only makes it so that we don't advertise R and 
> RG formats through eglQueryDmaBufFormatsEXT.  This means that you can't 
> import the planes each as separate images but you can still import a planar 
> image.
>
> Arguably, though, importing the planes as separate images does sound like a 
> feature...
>
>
> --Jason
>
>
> On Wed, 6 Jun 2018, 6:48 pm Jason Ekstrand, <jason at jlekstrand.net> wrote:
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/mesa/drivers/dri/i965/intel_screen.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
> b/src/mesa/drivers/dri/i965/intel_screen.c
> index 5f0eeb41779..f681b221e7b 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -1269,6 +1269,18 @@ intel_image_format_is_supported(const struct 
> intel_image_format *fmt)
>        fmt->fourcc == __DRI_IMAGE_FOURCC_SABGR8888)
>       return false;
>
> +   /* The dri_interface.h file says:
> +    *
> +    *    "R8, GR88 and NONE should not be used with createImageFromName or
> +    *    createImage, and are returned by query from sub images created with
> +    *    createImageFromNames (NONE, see above) and fromPlane (R8 & GR88)."
> +    *
> +    * Let's not advertise support for R or RG formats.
> +    */
> +   if (fmt->components == __DRI_IMAGE_COMPONENTS_R ||
> +       fmt->components == __DRI_IMAGE_COMPONENTS_RG)
> +      return false;
> +
>    return true;
> }
>
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20180606/4de6456c/attachment-0001.html>


More information about the mesa-stable mailing list