summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/debug.c54
-rw-r--r--src/mesa/main/mtypes.h4
-rw-r--r--src/mesa/main/points.c2
3 files changed, 29 insertions, 31 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 98ca65b96a9..77fef325583 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -150,36 +150,32 @@ void _mesa_print_info( void )
static void add_debug_flags( const char *debug )
{
#ifdef DEBUG
- if (_mesa_strstr(debug, "varray"))
- MESA_VERBOSE |= VERBOSE_VARRAY;
-
- if (_mesa_strstr(debug, "tex"))
- MESA_VERBOSE |= VERBOSE_TEXTURE;
-
- if (_mesa_strstr(debug, "imm"))
- MESA_VERBOSE |= VERBOSE_IMMEDIATE;
-
- if (_mesa_strstr(debug, "pipe"))
- MESA_VERBOSE |= VERBOSE_PIPELINE;
-
- if (_mesa_strstr(debug, "driver"))
- MESA_VERBOSE |= VERBOSE_DRIVER;
-
- if (_mesa_strstr(debug, "state"))
- MESA_VERBOSE |= VERBOSE_STATE;
-
- if (_mesa_strstr(debug, "api"))
- MESA_VERBOSE |= VERBOSE_API;
-
- if (_mesa_strstr(debug, "list"))
- MESA_VERBOSE |= VERBOSE_DISPLAY_LIST;
-
- if (_mesa_strstr(debug, "lighting"))
- MESA_VERBOSE |= VERBOSE_LIGHTING;
+ struct debug_option {
+ const char *name;
+ GLbitfield flag;
+ };
+ static const struct debug_option debug_opt[] = {
+ { "varray", VERBOSE_VARRAY },
+ { "tex", VERBOSE_TEXTURE },
+ { "imm", VERBOSE_IMMEDIATE },
+ { "pipe", VERBOSE_PIPELINE },
+ { "driver", VERBOSE_DRIVER },
+ { "state", VERBOSE_STATE },
+ { "api", VERBOSE_API },
+ { "list", VERBOSE_DISPLAY_LIST },
+ { "lighting", VERBOSE_LIGHTING },
+ { "disassem", VERBOSE_DISASSEM },
+ { "glsl", VERBOSE_GLSL }, /* report GLSL compile/link errors */
+ { "glsl_dump", VERBOSE_GLSL_DUMP } /* print shader GPU instructions */
+ };
+ GLuint i;
+
+ MESA_VERBOSE = 0x0;
+ for (i = 0; i < Elements(debug_opt); i++) {
+ if (_mesa_strstr(debug, debug_opt[i].name))
+ MESA_VERBOSE |= debug_opt[i].flag;
+ }
- if (_mesa_strstr(debug, "disassem"))
- MESA_VERBOSE |= VERBOSE_DISASSEM;
-
/* Debug flag:
*/
if (_mesa_strstr(debug, "flush"))
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 7ad8cb244d5..5e920f7aeb1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3135,7 +3135,9 @@ enum _verbose
VERBOSE_LIGHTING = 0x0200,
VERBOSE_PRIMS = 0x0400,
VERBOSE_VERTS = 0x0800,
- VERBOSE_DISASSEM = 0x1000
+ VERBOSE_DISASSEM = 0x1000,
+ VERBOSE_GLSL = 0x2000,
+ VERBOSE_GLSL_DUMP = 0x4000
};
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 7e189a0a8c9..1fe697033f1 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -200,7 +200,7 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
}
break;
case GL_POINT_SPRITE_COORD_ORIGIN:
- if (ctx->Extensions.ARB_point_sprite) {
+ if (ctx->Extensions.ARB_point_sprite || ctx->Extensions.NV_point_sprite) {
GLenum value = (GLenum) params[0];
if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) {
_mesa_error(ctx, GL_INVALID_VALUE,