diff options
author | Eric Anholt <[email protected]> | 2013-06-12 16:57:11 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-21 10:04:29 -0700 |
commit | faf3dbad0d30ed36ae6010a90ca2513edb591148 (patch) | |
tree | 77dfcda58e211cb78801cfaee2d3e9e837993979 /src/mesa/main/uniform_query.cpp | |
parent | 426ca34b7a2c3b9edfc0189daece8de3aff80627 (diff) |
mesa: Use shared code for converting shader targets to short strings.
We were duplicating this code all over the place, and they all would need
updating for the next set of shader targets.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 296f80f17bf..3c460042eee 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -33,6 +33,7 @@ #include "program/hash_table.h" #include "../glsl/program.h" #include "../glsl/ir_uniform.h" +#include "../glsl/glsl_parser_extras.h" #include "main/shaderapi.h" #include "main/shaderobj.h" #include "uniforms.h" @@ -434,12 +435,6 @@ log_uniform(const void *values, enum glsl_base_type basicType, static void log_program_parameters(const struct gl_shader_program *shProg) { - static const char *stages[] = { - "vertex", "fragment", "geometry" - }; - - assert(Elements(stages) == MESA_SHADER_TYPES); - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { if (shProg->_LinkedShaders[i] == NULL) continue; @@ -447,7 +442,7 @@ log_program_parameters(const struct gl_shader_program *shProg) const struct gl_program *const prog = shProg->_LinkedShaders[i]->Program; printf("Program %d %s shader parameters:\n", - shProg->Name, stages[i]); + shProg->Name, _mesa_glsl_shader_target_name(prog->Target)); for (unsigned j = 0; j < prog->Parameters->NumParameters; j++) { printf("%s: %p %f %f %f %f\n", prog->Parameters->Parameters[j].Name, |