[Mesa-dev] [PATCH] st/dri: allow direct UYVY import
Kenneth Graunke
kenneth at whitecape.org
Wed Feb 27 06:55:49 UTC 2019
On Tuesday, February 26, 2019 9:41:07 AM PST Christian Gmeiner wrote:
> Push this format to the pipe driver unchanged.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
> ---
> 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 6d134e3a40f..83aad4100a4 100644
> --- a/include/GL/internal/dri_interface.h
> +++ b/include/GL/internal/dri_interface.h
> @@ -1290,6 +1290,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 668d177c371..acdf19e1f5d 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 *
>
Looks good to me, though I'm no expert on planar formats.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190226/3fd52f54/attachment.sig>
More information about the mesa-dev
mailing list