diff options
author | Brian Paul <[email protected]> | 2009-02-06 10:21:36 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-02-06 10:21:36 -0700 |
commit | e01a03d2220199a4541f2cb8b42035237a571aa4 (patch) | |
tree | efc2fdd4c2341ad8763082396d44971481a28cf9 /src/mesa/main | |
parent | 6ce0c6e743b27cc284e8f164585cfe5892cd662a (diff) |
glsl: new MESA_GLSL env var for GLSL debugging features
Replaces the VERBOSE_GLSL, VERBOSE_GLSL_DUMP flags which only worked in debug
builds. MESA_GLSL will work both in debug and non-debug builds.
Also add facility to dump glUniform() calls to stdout.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/debug.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 77fef325583..65970a53a94 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -164,9 +164,7 @@ static void add_debug_flags( const char *debug ) { "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 */ + { "disassem", VERBOSE_DISASSEM } }; GLuint i; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 17dd3e6afde..509da06d092 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2162,6 +2162,13 @@ struct gl_shader_program }; +#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ +#define GLSL_LOG 0x2 /**< Write shaders to files */ +#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ +#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ +#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ + + /** * Context state for GLSL vertex/fragment shaders. */ @@ -2173,6 +2180,7 @@ struct gl_shader_state GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool; + GLbitfield Flags; /**< Mask of GLSL_x flags */ }; @@ -3163,8 +3171,6 @@ enum _verbose VERBOSE_PRIMS = 0x0400, VERBOSE_VERTS = 0x0800, VERBOSE_DISASSEM = 0x1000, - VERBOSE_GLSL = 0x2000, - VERBOSE_GLSL_DUMP = 0x4000 }; |