Drop GLcontext typedef and use struct gl_context instead
[mesa.git] / src / mesa / drivers / dri / common / utils.h
index 4e27bd21a1f1cacf94edf72103e9dc58359441a9..6349fb4b95c11fd560e0ed6bc11753ff35173812 100644 (file)
@@ -31,6 +31,7 @@
 #include <GL/gl.h>
 #include <GL/internal/dri_interface.h>
 #include "main/context.h"
+#include "main/remap.h"
 
 typedef struct __DRIutilversionRec2    __DRIutilversion2;
 
@@ -39,35 +40,6 @@ struct dri_debug_control {
     unsigned     flag;
 };
 
-/**
- * Description of the entry-points and parameters for an OpenGL function.
- */
-struct dri_extension_function {
-    /**
-     * \brief
-     * Packed string describing the parameter signature and the entry-point
-     * names.
-     * 
-     * The parameter signature and the names of the entry-points for this
-     * function are packed into a single string.  The substrings are
-     * separated by NUL characters.  The whole string is terminated by
-     * two consecutive NUL characters.
-     */
-    const char * strings;
-
-
-    /**
-     * Location in the remap table where the dispatch offset should be
-     * stored.
-     */
-    int remap_index;
-
-    /**
-     * Offset of the function in the dispatch table.
-     */
-    int offset;
-};
-
 /**
  * Description of the API for an extension to OpenGL.
  */
@@ -83,7 +55,7 @@ struct dri_extension {
      * is terminated by a structure with a \c NULL
      * \c dri_extension_function::strings pointer.
      */
-    const struct dri_extension_function * functions;
+    const struct gl_function_remap * functions;
 };
 
 /**
@@ -97,16 +69,19 @@ struct __DRIutilversionRec2 {
     int    patch;        /**< Patch-level. */
 };
 
+extern void
+__driUtilMessage(const char *f, ...);
+
 extern unsigned driParseDebugString( const char * debug,
     const struct dri_debug_control * control );
 
 extern unsigned driGetRendererString( char * buffer,
     const char * hardware_name, const char * driver_date, GLuint agp_mode );
 
-extern void driInitExtensions( GLcontext * ctx, 
+extern void driInitExtensions( struct gl_context * ctx, 
     const struct dri_extension * card_extensions, GLboolean enable_imaging );
 
-extern void driInitSingleExtension( GLcontext * ctx,
+extern void driInitSingleExtension( struct gl_context * ctx,
     const struct dri_extension * ext );
 
 extern GLboolean driCheckDriDdxDrmVersions2(const char * driver_name,
@@ -119,12 +94,12 @@ extern GLboolean driCheckDriDdxDrmVersions3(const char * driver_name,
     const __DRIversion * ddxActual, const __DRIutilversion2 * ddxExpected,
     const __DRIversion * drmActual, const __DRIversion * drmExpected);
 
-extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
+extern GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
                                           GLint *x, GLint *y,
                                           GLsizei *width, GLsizei *height );
 
 struct __DRIconfigRec {
-    __GLcontextModes modes;
+    struct gl_config modes;
 };
 
 extern __DRIconfig **
@@ -132,9 +107,11 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
                 const uint8_t * depth_bits, const uint8_t * stencil_bits,
                 unsigned num_depth_stencil_bits,
                 const GLenum * db_modes, unsigned num_db_modes,
-                const uint8_t * msaa_samples, unsigned num_msaa_modes);
+                const uint8_t * msaa_samples, unsigned num_msaa_modes,
+                GLboolean enable_accum);
 
-const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b);
+__DRIconfig **driConcatConfigs(__DRIconfig **a,
+                              __DRIconfig **b);
 
 int
 driGetConfigAttrib(const __DRIconfig *config,