Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / src / egl / main / eglconfig.h
index e025f7f8451c4dc419a5309d47ef510099a6a887..db1c4c10e088210e9f9c13200625a16b7e89257c 100644 (file)
@@ -4,10 +4,9 @@
 
 #include "egltypedefs.h"
 #include <GLES/gl.h>
-#include "GL/internal/glcore.h"
 
 
-#define MAX_ATTRIBS 100
+#define MAX_ATTRIBS 128
 #define FIRST_ATTRIB EGL_BUFFER_SIZE
 
 
@@ -18,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])
 
 
@@ -35,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
@@ -57,19 +60,5 @@ _eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint confi
 extern void
 _eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val);
 
-#if 0
-extern EGLBoolean
-_eglFillInConfigs( _EGLConfig *configs,
-                   EGLenum fb_format, EGLenum fb_type,
-                   const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
-                   unsigned num_depth_stencil_bits,
-                   const EGLenum * db_modes, unsigned num_db_modes,
-                   int visType );
-#endif
-
-
-extern void
-_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode);
-
 
 #endif /* EGLCONFIG_INCLUDED */