[Mesa-dev] [PATCH] i965: Support __DRI_IMAGE_FORMAT_XBGR2101010

Miguel Casas-Sanchez mcasas at chromium.org
Fri Apr 27 21:15:57 UTC 2018


I meant this commit :
https://cgit.freedesktop.org/mesa/mesa/commit/include/GL/internal/dri_interface.h?id=ebdc4c31e23ffd5ce0d1fc47dd8f76c146961e25

On 27 April 2018 at 16:54, Miguel Casas-Sanchez <mcasas at chromium.org> wrote:

> Correct, my mesa tree did not include those changes in
> include/GL/internal/dri_interface.h that landed in [1].
> I'll rebase and come back here. Thanks!
>
> [1] https://cgit.freedesktop.org/mesa/mesa/commit/include/
> GL/internal/dri_interface.h?id=f3878aa622c30f8b4e110464157fcdebc910603c
>
> On 27 April 2018 at 16:38, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>
>> Looks like your patch is against a fairly old tree. In the current
>> one, the following dri image formats exist:
>>
>> #define __DRI_IMAGE_FORMAT_XBGR2101010  0x1010
>> #define __DRI_IMAGE_FORMAT_ABGR2101010  0x1011
>> #define __DRI_IMAGE_FORMAT_SABGR8       0x1012
>>
>> I piped the XB30/AB30 stuff through to st/mesa -- I suspect I didn't
>> touch the intel driver though, so those are probably still valid. Do
>> check though.
>>
>>   -ilia
>>
>>
>> On Fri, Apr 27, 2018 at 4:16 PM, Miguel Casas <mcasas at chromium.org>
>> wrote:
>> > This patch adds support for XBGR2101010 (a.k.a. XB30) to i965.
>> > ToT supports XR30/AR30; XB30 is needed to support GL_RGB10_*
>> > texture internal formats with the correct channel order.
>> >
>> > BUG=https://crbug.com/776093
>> > TEST=Compile and deploy mesa+this patch, then playback
>> > a VP9 Profile 2 video with sw decoder using crrev.com/c/897894.
>> >
>> > Change-Id: Ib6b4e435d526670777e0aebcf03bf19432ae5c9d
>> > ---
>> >  include/GL/internal/dri_interface.h             | 1 +
>> >  src/mesa/drivers/dri/i965/brw_surface_formats.c | 1 +
>> >  src/mesa/drivers/dri/i965/intel_screen.c        | 3 +++
>> >  3 files changed, 5 insertions(+)
>> >
>> > diff --git a/include/GL/internal/dri_interface.h
>> b/include/GL/internal/dri_interface.h
>> > index 34a5c9fb01..d4bcf4f80d 100644
>> > --- a/include/GL/internal/dri_interface.h
>> > +++ b/include/GL/internal/dri_interface.h
>> > @@ -1227,6 +1227,7 @@ struct __DRIdri2ExtensionRec {
>> >  #define __DRI_IMAGE_FORMAT_R16          0x100d
>> >  #define __DRI_IMAGE_FORMAT_GR1616       0x100e
>> >  #define __DRI_IMAGE_FORMAT_YUYV         0x100f
>> > +#define __DRI_IMAGE_FORMAT_XBGR2101010  0x1010
>> >
>> >  #define __DRI_IMAGE_USE_SHARE          0x0001
>> >  #define __DRI_IMAGE_USE_SCANOUT                0x0002
>> > diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> b/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> > index 879cb42453..c1d0b80df8 100644
>> > --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> > +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> > @@ -187,6 +187,7 @@ brw_isl_format_for_mesa_format(mesa_format
>> mesa_format)
>> >        [MESA_FORMAT_R11G11B10_FLOAT] = ISL_FORMAT_R11G11B10_FLOAT,
>> >
>> >        [MESA_FORMAT_R10G10B10A2_UNORM] = ISL_FORMAT_R10G10B10A2_UNORM,
>> > +      [MESA_FORMAT_R10G10B10X2_UNORM] = ISL_FORMAT_R10G10B10A2_UNORM,
>> >        [MESA_FORMAT_B10G10R10A2_UINT] = ISL_FORMAT_B10G10R10A2_UINT,
>> >        [MESA_FORMAT_R10G10B10A2_UINT] = ISL_FORMAT_R10G10B10A2_UINT,
>> >
>> > diff --git a/src/mesa/drivers/dri/i965/intel_screen.c
>> b/src/mesa/drivers/dri/i965/intel_screen.c
>> > index a4e34e9f2c..8d548d92f3 100644
>> > --- a/src/mesa/drivers/dri/i965/intel_screen.c
>> > +++ b/src/mesa/drivers/dri/i965/intel_screen.c
>> > @@ -186,6 +186,9 @@ static const struct intel_image_format
>> intel_image_formats[] = {
>> >     { __DRI_IMAGE_FOURCC_XRGB2101010, __DRI_IMAGE_COMPONENTS_RGB, 1,
>> >       { { 0, 0, 0, __DRI_IMAGE_FORMAT_XRGB2101010, 4 } } },
>> >
>> > +   { __DRI_IMAGE_FOURCC_XBGR2101010, __DRI_IMAGE_COMPONENTS_RGB, 1,
>> > +     { { 0, 0, 0, __DRI_IMAGE_FORMAT_XBGR2101010, 4 } } },
>> > +
>> >     { __DRI_IMAGE_FOURCC_ARGB8888, __DRI_IMAGE_COMPONENTS_RGBA, 1,
>> >       { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB8888, 4 } } },
>> >
>> > --
>> > 2.13.5
>> >
>> > _______________________________________________
>> > 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/20180427/c002c5f2/attachment-0001.html>


More information about the mesa-dev mailing list