Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / egl / main / eglconfig.h
index f311e0702acc4c1a45ec3ecf499acf51a9da3867..db1c4c10e088210e9f9c13200625a16b7e89257c 100644 (file)
@@ -3,10 +3,10 @@
 
 
 #include "egltypedefs.h"
-#include "GL/internal/glcore.h"
+#include <GLES/gl.h>
 
 
-#define MAX_ATTRIBS 100
+#define MAX_ATTRIBS 128
 #define FIRST_ATTRIB EGL_BUFFER_SIZE
 
 
@@ -14,11 +14,14 @@ struct _egl_config
 {
    EGLConfig Handle;   /* the public/opaque handle which names this config */
    EGLint Attrib[MAX_ATTRIBS];
-   __GLcontextModes glmode;
 };
 
 
-#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])
 
 
@@ -26,26 +29,22 @@ extern void
 _eglInitConfig(_EGLConfig *config, EGLint id);
 
 
+extern EGLConfig
+_eglGetConfigHandle(_EGLConfig *config);
+
+
 extern _EGLConfig *
 _eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config);
 
 
 extern _EGLConfig *
-_eglAddConfig(_EGLDisplay *display, const _EGLConfig *config);
+_eglAddConfig(_EGLDisplay *display, _EGLConfig *config);
 
 
 extern EGLBoolean
 _eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list);
 
 
-extern EGLBoolean
-_eglConfigQualifies(const _EGLConfig *c, const _EGLConfig *min);
-
-
-extern EGLint
-_eglCompareConfigs(const _EGLConfig *a, const _EGLConfig *b);
-
-
 extern EGLBoolean
 _eglChooseConfig(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
 
@@ -61,16 +60,5 @@ _eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint confi
 extern void
 _eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val);
 
-extern GLboolean
-_eglFillInConfigs( _EGLConfig *configs,
-               GLenum fb_format, GLenum fb_type,
-               const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
-               unsigned num_depth_stencil_bits,
-               const GLenum * db_modes, unsigned num_db_modes,
-               int visType );
-                
-extern void
-_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode);
-
 
 #endif /* EGLCONFIG_INCLUDED */