i965/miptree: Check tex image allocation failures
[mesa.git] / src / mesa / drivers / dri / common / utils.h
index 3eaf13f4cab0e529b32f0bb05e1ef7b4e94c903a..7be0465c2617c91ffbd35d74b51e706f7966416f 100644 (file)
  * Authors:
  *    Ian Romanick <idr@us.ibm.com>
  */
-/* $XFree86:$ */
 
 #ifndef DRI_DEBUG_H
 #define DRI_DEBUG_H
 
-#include "context.h"
-#include "dri_util.h"
-
-struct dri_debug_control
-{
-    const char * string;
-    unsigned     flag;
-};
-
-extern unsigned driParseDebugString( const char * debug,
-    const struct dri_debug_control * control );
+#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
+#include "main/context.h"
 
 extern unsigned driGetRendererString( char * buffer,
-    const char * hardware_name, const char * driver_date, GLuint agp_mode );
-
-extern void driInitExtensions( GLcontext * ctx, 
-    const char * const card_extensions[], GLboolean enable_imaging );
+    const char * hardware_name, GLuint agp_mode );
 
-#ifndef DRI_NEW_INTERFACE_ONLY
-extern GLboolean driCheckDriDdxDrmVersions( __DRIscreenPrivate *sPriv,
-    const char * driver_name, int dri_major, int dri_minor,
-    int ddx_major, int ddx_minor, int drm_major, int drm_minor );
-#endif
-
-extern GLboolean driCheckDriDdxDrmVersions2(const char * driver_name,
-    const __DRIversion * driActual, const __DRIversion * driExpected,
-    const __DRIversion * ddxActual, const __DRIversion * ddxExpected,
-    const __DRIversion * drmActual, const __DRIversion * drmExpected);
-
-extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
-                                          GLint *x, GLint *y,
-                                          GLsizei *width, GLsizei *height );
+struct __DRIconfigRec {
+    struct gl_config modes;
+};
 
-extern GLboolean driFillInModes( __GLcontextModes ** modes,
-    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, int visType );
+extern __DRIconfig **
+driCreateConfigs(mesa_format format,
+                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,
+                GLboolean enable_accum, GLboolean color_depth_match);
+
+__DRIconfig **driConcatConfigs(__DRIconfig **a,
+                              __DRIconfig **b);
+
+int
+driGetConfigAttrib(const __DRIconfig *config,
+                  unsigned int attrib, unsigned int *value);
+int
+driIndexConfigAttrib(const __DRIconfig *config, int index,
+                    unsigned int *attrib, unsigned int *value);
+
+int
+driQueryRendererIntegerCommon(__DRIscreen *psp, int param, unsigned int *value);
 
 #endif /* DRI_DEBUG_H */