glsl_to_tgsi: Remove st_new_shader
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 20 Oct 2014 22:35:46 +0000 (15:35 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 25 Oct 2014 02:54:39 +0000 (19:54 -0700)
It was identical to the default implementation in _mesa_new_shader.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.h

index 9992bbb214c30fbe7cfc64fd70faed3f3f46f5d5..faff9c4bd665f1ebb0c588afaf84a1dd9fa45d0d 100644 (file)
@@ -242,6 +242,5 @@ st_init_program_functions(struct dd_function_table *functions)
    functions->IsProgramNative = st_is_program_native;
    functions->ProgramStringNotify = st_program_string_notify;
    
-   functions->NewShader = st_new_shader;
    functions->LinkShader = st_link_shader;
 }
index b0cb171edb85781b4c0ff516973298de4ecef9d7..a4e2c8da58697e6da6366c2284409d86af06e40b 100644 (file)
@@ -5331,22 +5331,6 @@ get_mesa_program(struct gl_context *ctx,
 
 extern "C" {
 
-struct gl_shader *
-st_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
-{
-   struct gl_shader *shader;
-   assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER ||
-          type == GL_GEOMETRY_SHADER_ARB);
-   shader = rzalloc(NULL, struct gl_shader);
-   if (shader) {
-      shader->Type = type;
-      shader->Stage = _mesa_shader_enum_to_shader_stage(type);
-      shader->Name = name;
-      _mesa_init_shader(ctx, shader);
-   }
-   return shader;
-}
-
 /**
  * Link a shader.
  * Called via ctx->Driver.LinkShader()
index e3990d399aabbcdaa407ee916c032ce6f6ba0adc..5ed640747b3a2c4a1afd7cefff9eb64b9ec80eb4 100644 (file)
@@ -61,8 +61,6 @@ void get_bitmap_visitor(struct st_fragment_program *fp,
                         struct glsl_to_tgsi_visitor *original,
                         int samplerIndex);
 
-struct gl_shader *st_new_shader(struct gl_context *ctx, GLuint name, GLuint type);
-
 GLboolean st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
 
 void