mesa: Allow setting GL_TEXTURE_MAX_LEVEL to 0 with GL_TEXTURE_RECTANGLE.
[mesa.git] / src / mesa / main / debug.c
index 9434c1ea2dd97628b4d45c80d261566902876daf..a5b40b4b5604fe3e787a563dcc9fe6582f01fcf0 100644 (file)
@@ -103,7 +103,7 @@ _mesa_print_state( const char *msg, GLuint state )
 /**
  * Print information about this Mesa version and build options.
  */
-void _mesa_print_info( void )
+void _mesa_print_info( struct gl_context *ctx )
 {
    _mesa_debug(NULL, "Mesa GL_VERSION = %s\n",
           (char *) _mesa_GetString(GL_VERSION));
@@ -111,8 +111,12 @@ void _mesa_print_info( void )
           (char *) _mesa_GetString(GL_RENDERER));
    _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n",
           (char *) _mesa_GetString(GL_VENDOR));
-   _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n",
-          (char *) _mesa_GetString(GL_EXTENSIONS));
+
+   /* use ctx as GL_EXTENSIONS will not work on 3.0 or higher
+    * core contexts.
+    */
+   _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", ctx->Extensions.String);
+
 #if defined(THREADS)
    _mesa_debug(NULL, "Mesa thread-safe: YES\n");
 #else
@@ -611,21 +615,21 @@ _mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img)
    else {
       /* XXX add more formats or make into a new format utility function */
       switch (img->TexFormat) {
-         case MESA_FORMAT_A8:
-         case MESA_FORMAT_L8:
-         case MESA_FORMAT_I8:
+         case MESA_FORMAT_A_UNORM8:
+         case MESA_FORMAT_L_UNORM8:
+         case MESA_FORMAT_I_UNORM8:
             c = 1;
             break;
-         case MESA_FORMAT_AL88:
-         case MESA_FORMAT_AL88_REV:
+         case MESA_FORMAT_L8A8_UNORM:
+         case MESA_FORMAT_A8L8_UNORM:
             c = 2;
             break;
-         case MESA_FORMAT_RGB888:
-         case MESA_FORMAT_BGR888:
+         case MESA_FORMAT_BGR_UNORM8:
+         case MESA_FORMAT_RGB_UNORM8:
             c = 3;
             break;
-         case MESA_FORMAT_RGBA8888:
-         case MESA_FORMAT_ARGB8888:
+         case MESA_FORMAT_A8B8G8R8_UNORM:
+         case MESA_FORMAT_B8G8R8A8_UNORM:
             c = 4;
             break;
          default: