[Mesa-dev] [PATCH v2 1/2] dri_interface.h: define __DRI_ATTRIB_MAX
Emil Velikov
emil.l.velikov at gmail.com
Tue May 2 12:11:07 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Thus we can use the value to explicitly size arrays, instead of
__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1.
The latter seems magical and is error prone, as we add more dri
attributes.
v2: Fix off by one error (Tomasz)
Cc: Tomasz Figa <tfiga at chromium.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Patch 2/2 is unchanged so no point in re-sending it.
Tomasz, thanks for spotting these.
---
include/GL/internal/dri_interface.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 86efd1bdc98..c83056aa702 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -702,6 +702,7 @@ struct __DRIuseInvalidateExtensionRec {
#define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS 46
#define __DRI_ATTRIB_YINVERTED 47
#define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE 48
+#define __DRI_ATTRIB_MAX (__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1)
/* __DRI_ATTRIB_RENDER_TYPE */
#define __DRI_ATTRIB_RGBA_BIT 0x01
--
2.12.2
More information about the mesa-dev
mailing list