From 076a7095bb46cd11ac1938be1652f5fdf862467b Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 26 Feb 2019 18:41:07 +0100 Subject: [PATCH] st/dri: allow direct UYVY import Push this format to the pipe driver unchanged. Signed-off-by: Christian Gmeiner Reviewed-by: Kenneth Graunke --- include/GL/internal/dri_interface.h | 1 + src/gallium/state_trackers/dri/dri2.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 0858092ecf5..af0ee9c5667 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -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 diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 01e88d7c50a..efb43c0d797 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -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 * -- 2.30.2