summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/eglconfig.h')
-rw-r--r--src/egl/main/eglconfig.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index d12f66245c0..db1c4c10e08 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -6,7 +6,7 @@
#include <GLES/gl.h>
-#define MAX_ATTRIBS 100
+#define MAX_ATTRIBS 128
#define FIRST_ATTRIB EGL_BUFFER_SIZE
@@ -17,7 +17,11 @@ struct _egl_config
};
-#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
+#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) \
+ assert((ATTR) - FIRST_ATTRIB < MAX_ATTRIBS); \
+ ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
+
+
#define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB])