summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2017-05-30 15:07:13 +0200
committerLucas Stach <[email protected]>2017-12-20 16:54:37 +0100
commit51523ab9fa21ef3ee02dfa9e5995eab654cfe43a (patch)
tree1df1609fc3d6ea7fc062bcb322f2e31e004171a1 /src/gallium/state_trackers
parent9702fac68e8bd07be8871f7925d7f9fb98da3699 (diff)
st/dri: allow direct YUYV import
Push this format to the pipe driver unchanged. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index d5ae9cbd69b..3388b17da53 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -121,6 +121,10 @@ static int convert_fourcc(int format, int *dri_components_p)
format = __DRI_IMAGE_FORMAT_GR1616;
dri_components = __DRI_IMAGE_COMPONENTS_RG;
break;
+ case __DRI_IMAGE_FOURCC_YUYV:
+ format = __DRI_IMAGE_FORMAT_YUYV;
+ dri_components = __DRI_IMAGE_COMPONENTS_Y_XUXV;
+ break;
/*
* For multi-planar YUV formats, we return the format of the first
* plane only. Since there is only one caller which supports multi-
@@ -210,6 +214,9 @@ static enum pipe_format dri2_format_to_pipe_format (int format)
case __DRI_IMAGE_FORMAT_GR1616:
pf = PIPE_FORMAT_R16G16_UNORM;
break;
+ case __DRI_IMAGE_FORMAT_YUYV:
+ pf = PIPE_FORMAT_YUYV;
+ break;
default:
pf = PIPE_FORMAT_NONE;
break;