summaryrefslogtreecommitdiff
path: root/include/GL
diff options
context:
space:
mode:
authorKevin Strasser <kevin.strasser@intel.com>2019-01-24 16:11:11 -0800
committerAdam Jackson <ajax@nwnk.net>2019-08-21 18:36:57 +0000
commit5a747306ce6dd3021c15cfabc83465ec3fb4bb1c (patch)
treeb2023d6e7d6f91aeb169a13b7cfd47ced1b344ee /include/GL
parent9328e7c04cd86c0eff00fb91061a0fdbf7b1e149 (diff)
downloadmesa-5a747306ce6dd3021c15cfabc83465ec3fb4bb1c.tar.gz
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>
Diffstat (limited to 'include/GL')
-rw-r--r--include/GL/internal/dri_interface.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 9f5bc7c569e..c5d22389969 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -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