gallium: add back YVU support
authorXiong, James <james.xiong@intel.com>
Thu, 15 Aug 2019 17:02:52 +0000 (10:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 16 Aug 2019 20:24:49 +0000 (13:24 -0700)
PIPE_FORMAT_YV12 is not handled so switching to PIPE_FORMAT_IYUV and
adding back YVU support.

Signed-off-by: James Xiong <james.xiong@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/state_trackers/dri/dri_helpers.c

index 28e732931189bbc3bd3b1680b94aadf5a744e75d..c6a898f121e0e92dda7347bdc2a4f649a47f9f62 100644 (file)
@@ -453,27 +453,27 @@ static const struct dri2_format_mapping dri2_format_table[] = {
           { 2, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
 
       { __DRI_IMAGE_FOURCC_YVU410,        __DRI_IMAGE_FORMAT_NONE,
-        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_YV12, 3,
+        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_IYUV, 3,
         { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 2, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 },
           { 1, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 } } },
       { __DRI_IMAGE_FOURCC_YVU411,        __DRI_IMAGE_FORMAT_NONE,
-        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_YV12, 3,
+        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_IYUV, 3,
         { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 2, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 1, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
       { __DRI_IMAGE_FOURCC_YVU420,        __DRI_IMAGE_FORMAT_NONE,
-        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_YV12, 3,
+        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_IYUV, 3,
         { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 2, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 },
           { 1, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 } } },
       { __DRI_IMAGE_FOURCC_YVU422,        __DRI_IMAGE_FORMAT_NONE,
-        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_YV12, 3,
+        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_IYUV, 3,
         { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 2, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 1, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
       { __DRI_IMAGE_FOURCC_YVU444,        __DRI_IMAGE_FORMAT_NONE,
-        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_YV12, 3,
+        __DRI_IMAGE_COMPONENTS_Y_U_V,     PIPE_FORMAT_IYUV, 3,
         { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 2, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
           { 1, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },