mesa: Remove _mesa_progshader_enum_to_string(), which is no longer used.
authorPaul Berry <stereotype441@gmail.com>
Tue, 7 Jan 2014 19:40:00 +0000 (11:40 -0800)
committerPaul Berry <stereotype441@gmail.com>
Wed, 8 Jan 2014 15:32:14 +0000 (07:32 -0800)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h
src/mesa/main/uniform_query.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index ce8279f7b547f9231ede83e7f4056da779fbc442..fe29dddceb28b770f9aa41d9ad382d59b18988a0 100644 (file)
@@ -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
index 6572488e033115a7018722c010a4edea804371ec..2444a96ce6c86205282a74ce95d31001c75222ca 100644 (file)
@@ -440,9 +440,6 @@ extern "C" {
 extern const char *
 _mesa_shader_stage_to_string(unsigned stage);
 
-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);
 
index d90193e03a545c04586a27c190dc389f01fb9dec..82d7628e8d8aa89abd3524b593a8ffc8a337ddb4 100644 (file)
@@ -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,
index 9cb97a0352b151107cc7e3ddb0a5caf030dfc511..c4dc77f3e8c7210d35a3792ab52d260239e816f0 100644 (file)
@@ -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");