[Mesa-dev] [PATCH 7/7] mesa: Remove _mesa_progshader_enum_to_string(), which is no longer used.
Paul Berry
stereotype441 at gmail.com
Tue Jan 7 14:13:17 PST 2014
---
src/glsl/glsl_parser_extras.cpp | 29 -----------------------------
src/glsl/glsl_parser_extras.h | 3 ---
src/mesa/main/uniform_query.cpp | 2 +-
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
4 files changed, 2 insertions(+), 34 deletions(-)
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index f9aa1d6..311a332 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -329,35 +329,6 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
}
}
-extern "C" {
-
-/**
- * Translate a GLenum to a short shader stage name for debug printouts and
- * error messages.
- *
- * It recognizes the PROGRAM variants of the names so it can be used
- * with a struct gl_program->Target, not just a struct
- * gl_shader->Type.
- */
-const char *
-_mesa_progshader_enum_to_string(GLenum type)
-{
- switch (type) {
- case GL_VERTEX_SHADER:
- case GL_VERTEX_PROGRAM_ARB:
- return "vertex";
- case GL_FRAGMENT_SHADER:
- case GL_FRAGMENT_PROGRAM_ARB:
- return "fragment";
- case GL_GEOMETRY_SHADER:
- return "geometry";
- default:
- assert(!"Should not get here.");
- return "unknown";
- }
-}
-
-} /* extern "C" */
/**
* Translate a gl_shader_stage to a short shader stage name for debug
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 2a7ae3d..abbbc00 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -440,9 +440,6 @@ extern "C" {
extern const char *
_mesa_shader_stage_to_string(unsigned target);
-extern const char *
-_mesa_progshader_enum_to_string(GLenum type);
-
extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, struct gl_context *gl_ctx);
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index d90193e..82d7628 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -452,7 +452,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, _mesa_progshader_enum_to_string(prog->Target));
+ shProg->Name, _mesa_shader_stage_to_string(i));
for (unsigned j = 0; j < prog->Parameters->NumParameters; j++) {
printf("%s: %p %f %f %f %f\n",
prog->Parameters->Parameters[j].Name,
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 9cb97a0..c4dc77f 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5143,7 +5143,7 @@ get_mesa_program(struct gl_context *ctx,
if (ctx->Shader.Flags & GLSL_DUMP) {
printf("\n");
printf("GLSL IR for linked %s program %d:\n",
- _mesa_progshader_enum_to_string(shader->Type),
+ _mesa_shader_stage_to_string(shader->Stage),
shader_program->Name);
_mesa_print_ir(shader->ir, NULL);
printf("\n");
--
1.8.5.2
More information about the mesa-dev
mailing list