dri: Add XYUV8888 format
authorKasireddy, Vivek <vivek.kasireddy@intel.com>
Wed, 13 Feb 2019 00:44:04 +0000 (16:44 -0800)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 26 Feb 2019 13:08:52 +0000 (13:08 +0000)
In addition to adding this format to the dri_interface header,
add an entry in the android and wayland backends as well.

Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
include/GL/internal/dri_interface.h
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/platform_android.c
src/egl/wayland/wayland-drm/wayland-drm.xml

index 26b4bb129084fbe06ac9686558727ba2c563182d..0858092ecf5160b45df3275bdd08472141266bb8 100644 (file)
@@ -1347,6 +1347,7 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FOURCC_YUYV                0x56595559
 #define __DRI_IMAGE_FOURCC_UYVY                0x59565955
 #define __DRI_IMAGE_FOURCC_AYUV                0x56555941
 #define __DRI_IMAGE_FOURCC_YUYV                0x56595559
 #define __DRI_IMAGE_FOURCC_UYVY                0x59565955
 #define __DRI_IMAGE_FOURCC_AYUV                0x56555941
+#define __DRI_IMAGE_FOURCC_XYUV8888    0x56555958
 
 #define __DRI_IMAGE_FOURCC_YVU410      0x39555659
 #define __DRI_IMAGE_FOURCC_YVU411      0x31315659
 
 #define __DRI_IMAGE_FOURCC_YVU410      0x39555659
 #define __DRI_IMAGE_FOURCC_YVU411      0x31315659
@@ -1378,6 +1379,7 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_COMPONENTS_Y_XUXV  0x3005
 #define __DRI_IMAGE_COMPONENTS_Y_UXVX  0x3008
 #define __DRI_IMAGE_COMPONENTS_AYUV    0x3009
 #define __DRI_IMAGE_COMPONENTS_Y_XUXV  0x3005
 #define __DRI_IMAGE_COMPONENTS_Y_UXVX  0x3008
 #define __DRI_IMAGE_COMPONENTS_AYUV    0x3009
+#define __DRI_IMAGE_COMPONENTS_XYUV    0x300A
 #define __DRI_IMAGE_COMPONENTS_R       0x3006
 #define __DRI_IMAGE_COMPONENTS_RG      0x3007
 
 #define __DRI_IMAGE_COMPONENTS_R       0x3006
 #define __DRI_IMAGE_COMPONENTS_RG      0x3007
 
index 8721e67afb32cf8588e787be9d37ff6bedbf7a46..9c9b753fafe9aa508b20ffab4794e358a7de96c1 100644 (file)
@@ -2247,6 +2247,7 @@ dri2_num_fourcc_format_planes(EGLint format)
    case DRM_FORMAT_UYVY:
    case DRM_FORMAT_VYUY:
    case DRM_FORMAT_AYUV:
    case DRM_FORMAT_UYVY:
    case DRM_FORMAT_VYUY:
    case DRM_FORMAT_AYUV:
+   case DRM_FORMAT_XYUV8888:
       return 1;
 
    case DRM_FORMAT_NV12:
       return 1;
 
    case DRM_FORMAT_NV12:
index 5b530f2ba73e99b7b943a7c947466da80db3a68b..65ed936de10d92aefb80e40a356bf054221765b5 100644 (file)
@@ -73,6 +73,7 @@ static const struct droid_yuv_format droid_yuv_formats[] = {
    { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   0, 1, __DRI_IMAGE_FOURCC_YUV420 },
    { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   1, 1, __DRI_IMAGE_FOURCC_YVU420 },
    { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   1, 1, __DRI_IMAGE_FOURCC_AYUV },
    { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   0, 1, __DRI_IMAGE_FOURCC_YUV420 },
    { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   1, 1, __DRI_IMAGE_FOURCC_YVU420 },
    { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   1, 1, __DRI_IMAGE_FOURCC_AYUV },
+   { HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,   1, 1, __DRI_IMAGE_FOURCC_XYUV8888 },
 };
 
 static int
 };
 
 static int
index 83aa5615539bcb2680219407c49b1cea0e5e723a..a1f2540e42644a9abf3940a4e58b2df046ee911f 100644 (file)
@@ -85,6 +85,7 @@
       <entry name="uyvy" value="0x59565955"/>
       <entry name="vyuy" value="0x59555956"/>
       <entry name="ayuv" value="0x56555941"/>
       <entry name="uyvy" value="0x59565955"/>
       <entry name="vyuy" value="0x59555956"/>
       <entry name="ayuv" value="0x56555941"/>
+      <entry name="xyuv8888" value="0x56555958"/>
       <entry name="nv12" value="0x3231564e"/>
       <entry name="nv21" value="0x3132564e"/>
       <entry name="nv16" value="0x3631564e"/>
       <entry name="nv12" value="0x3231564e"/>
       <entry name="nv21" value="0x3132564e"/>
       <entry name="nv16" value="0x3631564e"/>