[Mesa-dev] [PATCH] i965: add {X, A}BGR2101010 to 'intel_image_formats'

2018-05-08 Thread Miguel Casas
This patch adds {X,A}BGR2101010 entries to the list of supported
'intel_image_formats'.

Bug: https://crbug.com/776093
---
 src/mesa/drivers/dri/i965/intel_screen.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 409f763b64..d3488b9f29 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -190,6 +190,12 @@ 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_ABGR2101010, __DRI_IMAGE_COMPONENTS_RGBA, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_ABGR2101010, 4 } } },
+
+   { __DRI_IMAGE_FOURCC_XBGR2101010, __DRI_IMAGE_COMPONENTS_RGB, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_XBGR2101010, 4 } } },
+
{ __DRI_IMAGE_FOURCC_ARGB, __DRI_IMAGE_COMPONENTS_RGBA, 1,
  { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } },
 
-- 
2.17.0.441.gb46fe60e1d-goog

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] i965: add {X, A}BGR2101010 to 'intel_image_formats'

2018-05-08 Thread Miguel Casas
This patch adds {X,A}BGR2101010 entries to the list of supported
'intel_image_formats'.

Bug: https://crbug.com/776093
---
 src/mesa/drivers/dri/i965/intel_screen.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 409f763b64..d3488b9f29 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -190,6 +190,12 @@ 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_ABGR2101010, __DRI_IMAGE_COMPONENTS_RGBA, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_ABGR2101010, 4 } } },
+
+   { __DRI_IMAGE_FOURCC_XBGR2101010, __DRI_IMAGE_COMPONENTS_RGB, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_XBGR2101010, 4 } } },
+
{ __DRI_IMAGE_FOURCC_ARGB, __DRI_IMAGE_COMPONENTS_RGBA, 1,
  { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } },
 
-- 
2.17.0.441.gb46fe60e1d-goog

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/2] dri_util: Add R10G10B10{A, X}2 translation between DRI and mesa_format.

2018-05-08 Thread Miguel Casas
Add R10G10B10{A,X}2 translation between mesa_format and DRI format
to driGLFormatToImageFormat() and driImageFormatToGLFormat().

Bug: https://crbug.com/776093
---
 src/mesa/drivers/dri/common/dri_util.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index 7cb6248b13..78c6bbf234 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -886,6 +886,10 @@ driGLFormatToImageFormat(mesa_format format)
   return __DRI_IMAGE_FORMAT_ARGB2101010;
case MESA_FORMAT_B10G10R10X2_UNORM:
   return __DRI_IMAGE_FORMAT_XRGB2101010;
+   case MESA_FORMAT_R10G10B10A2_UNORM:
+  return __DRI_IMAGE_FORMAT_ABGR2101010;
+   case MESA_FORMAT_R10G10B10X2_UNORM:
+  return __DRI_IMAGE_FORMAT_XBGR2101010;
case MESA_FORMAT_B8G8R8A8_UNORM:
   return __DRI_IMAGE_FORMAT_ARGB;
case MESA_FORMAT_R8G8B8A8_UNORM:
@@ -923,6 +927,10 @@ driImageFormatToGLFormat(uint32_t image_format)
   return MESA_FORMAT_B10G10R10A2_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
   return MESA_FORMAT_B10G10R10X2_UNORM;
+   case __DRI_IMAGE_FORMAT_ABGR2101010:
+  return MESA_FORMAT_R10G10B10A2_UNORM;
+   case __DRI_IMAGE_FORMAT_XBGR2101010:
+  return MESA_FORMAT_R10G10B10X2_UNORM;
case __DRI_IMAGE_FORMAT_ARGB:
   return MESA_FORMAT_B8G8R8A8_UNORM;
case __DRI_IMAGE_FORMAT_ABGR:
-- 
2.17.0.441.gb46fe60e1d-goog

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/2] mesa: add R10G10B10{A, X}2 to MESA <-> DRI format translations

2018-05-03 Thread Miguel Casas
This patch adds R10G10B10{A,X}2 MESA <-> DRI translation entries
in the appropriate places for dri2 functions to accept them.

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.
---
 src/mesa/drivers/dri/common/dri_util.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index 7cb6248b13..78c6bbf234 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -886,6 +886,10 @@ driGLFormatToImageFormat(mesa_format format)
   return __DRI_IMAGE_FORMAT_ARGB2101010;
case MESA_FORMAT_B10G10R10X2_UNORM:
   return __DRI_IMAGE_FORMAT_XRGB2101010;
+   case MESA_FORMAT_R10G10B10A2_UNORM:
+  return __DRI_IMAGE_FORMAT_ABGR2101010;
+   case MESA_FORMAT_R10G10B10X2_UNORM:
+  return __DRI_IMAGE_FORMAT_XBGR2101010;
case MESA_FORMAT_B8G8R8A8_UNORM:
   return __DRI_IMAGE_FORMAT_ARGB;
case MESA_FORMAT_R8G8B8A8_UNORM:
@@ -923,6 +927,10 @@ driImageFormatToGLFormat(uint32_t image_format)
   return MESA_FORMAT_B10G10R10A2_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
   return MESA_FORMAT_B10G10R10X2_UNORM;
+   case __DRI_IMAGE_FORMAT_ABGR2101010:
+  return MESA_FORMAT_R10G10B10A2_UNORM;
+   case __DRI_IMAGE_FORMAT_XBGR2101010:
+  return MESA_FORMAT_R10G10B10X2_UNORM;
case __DRI_IMAGE_FORMAT_ARGB:
   return MESA_FORMAT_B8G8R8A8_UNORM;
case __DRI_IMAGE_FORMAT_ABGR:
-- 
2.17.0.441.gb46fe60e1d-goog

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] i965: add {X, A}BGR2101010 to |intel_image_formats|

2018-05-03 Thread Miguel Casas
This patch adds {X,A}BGR2101010 entries to the list of supported
|intel_image_formats|.

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.
---
 src/mesa/drivers/dri/i965/intel_screen.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 409f763b64..d3488b9f29 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -190,6 +190,12 @@ 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_ABGR2101010, __DRI_IMAGE_COMPONENTS_RGBA, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_ABGR2101010, 4 } } },
+
+   { __DRI_IMAGE_FOURCC_XBGR2101010, __DRI_IMAGE_COMPONENTS_RGB, 1,
+ { { 0, 0, 0, __DRI_IMAGE_FORMAT_XBGR2101010, 4 } } },
+
{ __DRI_IMAGE_FOURCC_ARGB, __DRI_IMAGE_COMPONENTS_RGBA, 1,
  { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } },
 
-- 
2.17.0.441.gb46fe60e1d-goog

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-30 Thread Miguel Casas-Sanchez
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 <mca...@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 <imir...@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 <mca...@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_SCANOUT0x0002
>> > 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_ARGB, __DRI_IMAGE_COMPONENTS_RGBA, 1,
>> >   { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } },
>> >
>> > --
>> > 2.13.5
>> >
>> > ___
>> > mesa-dev mailing list
>> > mesa-dev@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-30 Thread Miguel Casas-Sanchez
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 <imir...@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 <mca...@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_SCANOUT0x0002
> > 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_ARGB, __DRI_IMAGE_COMPONENTS_RGBA, 1,
> >   { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } },
> >
> > --
> > 2.13.5
> >
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2018-04-27 Thread Miguel Casas
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_SCANOUT0x0002
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_ARGB, __DRI_IMAGE_COMPONENTS_RGBA, 1,
  { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } },
 
-- 
2.13.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev