st/dri: allow direct UYVY import
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Tue, 26 Feb 2019 17:41:07 +0000 (18:41 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Mon, 11 Mar 2019 21:19:11 +0000 (22:19 +0100)
Push this format to the pipe driver unchanged.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
include/GL/internal/dri_interface.h
src/gallium/state_trackers/dri/dri2.c

index 0858092ecf5160b45df3275bdd08472141266bb8..af0ee9c56670fb210b9819b4388162bbdb20b238 100644 (file)
@@ -1292,6 +1292,7 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FORMAT_XBGR2101010  0x1010
 #define __DRI_IMAGE_FORMAT_ABGR2101010  0x1011
 #define __DRI_IMAGE_FORMAT_SABGR8       0x1012
+#define __DRI_IMAGE_FORMAT_UYVY         0x1013
 
 #define __DRI_IMAGE_USE_SHARE          0x0001
 #define __DRI_IMAGE_USE_SCANOUT                0x0002
index 01e88d7c50a6695ca9357d72a3d9dbc37442098b..efb43c0d7973c533324b9827aba3b0c16adb1fc2 100644 (file)
@@ -110,6 +110,8 @@ static const struct dri2_format_mapping dri2_format_table[] = {
         __DRI_IMAGE_COMPONENTS_Y_UV,      PIPE_FORMAT_NV12 },
       { __DRI_IMAGE_FOURCC_YUYV,          __DRI_IMAGE_FORMAT_YUYV,
         __DRI_IMAGE_COMPONENTS_Y_XUXV,    PIPE_FORMAT_YUYV },
+      { __DRI_IMAGE_FOURCC_UYVY,          __DRI_IMAGE_FORMAT_UYVY,
+        __DRI_IMAGE_COMPONENTS_Y_UXVX,    PIPE_FORMAT_UYVY },
 };
 
 static const struct dri2_format_mapping *