[Mesa-dev] [PATCH 1/2] dri: Add __DRI_IMAGE_FORMAT_SABGR8

Kenneth Graunke kenneth at whitecape.org
Mon Apr 16 22:46:52 UTC 2018


On Monday, March 19, 2018 4:41:44 AM PDT Tapani Pälli wrote:
> Add format definition and required plumbing to create images.
> Note that there is no match to drm_fourcc definition, just like
> with existing _DRI_IMAGE_FOURCC_SARGB8888.
> 
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  include/GL/internal/dri_interface.h    | 2 ++
>  src/loader/loader_dri3_helper.c        | 2 ++
>  src/mesa/drivers/dri/common/dri_util.c | 4 ++++
>  src/mesa/drivers/dri/common/utils.c    | 1 +
>  4 files changed, 9 insertions(+)
> 
> diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
> index 4f4795c7ae..319a1fe4f9 100644
> --- a/include/GL/internal/dri_interface.h
> +++ b/include/GL/internal/dri_interface.h
> @@ -1253,6 +1253,7 @@ struct __DRIdri2ExtensionRec {
>  #define __DRI_IMAGE_FORMAT_YUYV         0x100f
>  #define __DRI_IMAGE_FORMAT_XBGR2101010  0x1010
>  #define __DRI_IMAGE_FORMAT_ABGR2101010  0x1011
> +#define __DRI_IMAGE_FORMAT_SABGR8       0x1012
>  
>  #define __DRI_IMAGE_USE_SHARE		0x0001
>  #define __DRI_IMAGE_USE_SCANOUT		0x0002
> @@ -1289,6 +1290,7 @@ struct __DRIdri2ExtensionRec {
>  #define __DRI_IMAGE_FOURCC_ABGR8888	0x34324241
>  #define __DRI_IMAGE_FOURCC_XBGR8888	0x34324258
>  #define __DRI_IMAGE_FOURCC_SARGB8888	0x83324258
> +#define __DRI_IMAGE_FOURCC_SABGR8888	0x84324258

I don't actually know what these numbers mean, but assuming this is a
correct define, the patches look pretty reasonable to me.

Both patches are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

("It's just sRGB, what could go wrong?" - quote on a tombstone)
-------------- 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/20180416/6fc16071/attachment-0001.sig>


More information about the mesa-dev mailing list