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

Jason Ekstrand jason at jlekstrand.net
Wed Jun 6 18:03:46 UTC 2018


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.

--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-dev/attachments/20180606/2bec5b67/attachment.html>


More information about the mesa-dev mailing list