dri: Support 1555/4444 formats

Add support for 1555 and 4444 formats, both in RGB/BGR ordering, with
and without alpha.

These are already supported by Gallium and drivers, but not yet for
winsys surfaces. Adding these is enough to make them renderable when
using Weston on iris.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24331>
This commit is contained in:
Daniel Stone
2023-07-26 12:18:10 +01:00
parent 0a07431e9a
commit 00aa095d53
7 changed files with 167 additions and 3 deletions

View File

@@ -1275,6 +1275,13 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_FORMAT_SXRGB8 0x1016
#define __DRI_IMAGE_FORMAT_ABGR16161616 0x1017
#define __DRI_IMAGE_FORMAT_XBGR16161616 0x1018
#define __DRI_IMAGE_FORMAT_ARGB4444 0x1019
#define __DRI_IMAGE_FORMAT_XRGB4444 0x101a
#define __DRI_IMAGE_FORMAT_ABGR4444 0x101b
#define __DRI_IMAGE_FORMAT_XBGR4444 0x101c
#define __DRI_IMAGE_FORMAT_XRGB1555 0x101d
#define __DRI_IMAGE_FORMAT_ABGR1555 0x101e
#define __DRI_IMAGE_FORMAT_XBGR1555 0x101f
#define __DRI_IMAGE_USE_SHARE 0x0001
#define __DRI_IMAGE_USE_SCANOUT 0x0002