dri: Add config attributes for color channel shift
The existing mask attributes can only support up to 32 bpp. Introduce per-channel SHIFT attributes that indicate how many bits, from lsb towards msb, the bit field is offset. A shift of -1 will indicate that there is no bit field set for the channel. As old loaders will still be looking for masks, we set the masks to 0 for any formats wider than 32 bpp. Signed-off-by: Kevin Strasser <kevin.strasser@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:

committed by
Adam Jackson

parent
9328e7c04c
commit
5a747306ce
@@ -809,7 +809,11 @@ struct __DRIuseInvalidateExtensionRec {
|
||||
#define __DRI_ATTRIB_YINVERTED 47
|
||||
#define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE 48
|
||||
#define __DRI_ATTRIB_MUTABLE_RENDER_BUFFER 49 /* EGL_MUTABLE_RENDER_BUFFER_BIT_KHR */
|
||||
#define __DRI_ATTRIB_MAX 50
|
||||
#define __DRI_ATTRIB_RED_SHIFT 50
|
||||
#define __DRI_ATTRIB_GREEN_SHIFT 51
|
||||
#define __DRI_ATTRIB_BLUE_SHIFT 52
|
||||
#define __DRI_ATTRIB_ALPHA_SHIFT 53
|
||||
#define __DRI_ATTRIB_MAX 54
|
||||
|
||||
/* __DRI_ATTRIB_RENDER_TYPE */
|
||||
#define __DRI_ATTRIB_RGBA_BIT 0x01
|
||||
|
Reference in New Issue
Block a user