summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-07 14:34:30 -0600
committerBrian Paul <[email protected]>2008-07-07 14:34:30 -0600
commitde71e4741d8b4e3719e702431912374f1cb90034 (patch)
tree2f104e071ada74acd411825d38ea32fca4e02287
parent1828b6d0315be805ec1eea1594fae5b28cfb4ca8 (diff)
egl: bump up MAX_ATTRIBS, added assertion
-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])