Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / egl / main / eglconfig.h
index b10a61985d11d5e256f908ee3b3ca9d78bbceb84..db1c4c10e088210e9f9c13200625a16b7e89257c 100644 (file)
@@ -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])
 
 
@@ -34,7 +38,7 @@ _eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config);
 
 
 extern _EGLConfig *
-_eglAddConfig(_EGLDisplay *display, const _EGLConfig *config);
+_eglAddConfig(_EGLDisplay *display, _EGLConfig *config);
 
 
 extern EGLBoolean