[Mesa-dev] [PATCH 08/15] i965: Remove brw_new_shader

Ian Romanick idr at freedesktop.org
Thu Oct 23 09:35:23 PDT 2014


From: Ian Romanick <ian.d.romanick at intel.com>

It was identical to the default implementation in _mesa_new_shader.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/i965/brw_program.c  |  1 -
 src/mesa/drivers/dri/i965/brw_shader.cpp | 16 ----------------
 src/mesa/drivers/dri/i965/brw_wm.h       |  1 -
 3 files changed, 18 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index e56ece0..3de96ae 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -236,7 +236,6 @@ void brwInitFragProgFuncs( struct dd_function_table *functions )
    functions->IsProgramNative = brwIsProgramNative;
    functions->ProgramStringNotify = brwProgramStringNotify;
 
-   functions->NewShader = brw_new_shader;
    functions->LinkShader = brw_link_shader;
 }
 
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 21dcf2d..56d7f3f 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -33,22 +33,6 @@ extern "C" {
 #include "glsl/glsl_parser_extras.h"
 #include "main/shaderapi.h"
 
-struct gl_shader *
-brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
-{
-   struct brw_shader *shader;
-
-   shader = rzalloc(NULL, struct brw_shader);
-   if (shader) {
-      shader->base.Type = type;
-      shader->base.Stage = _mesa_shader_enum_to_shader_stage(type);
-      shader->base.Name = name;
-      _mesa_init_shader(ctx, &shader->base);
-   }
-
-   return &shader->base;
-}
-
 /**
  * Performs a compile of the shader stages even when we don't know
  * what non-orthogonal state will be set, in the hope that it reflects
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 0e0039b..f7bcc28 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -95,7 +95,6 @@ const unsigned *brw_wm_fs_emit(struct brw_context *brw,
                                unsigned *final_assembly_size);
 
 GLboolean brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
-struct gl_shader *brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type);
 
 bool brw_color_buffer_write_enabled(struct brw_context *brw);
 bool do_wm_prog(struct brw_context *brw,
-- 
1.8.1.4



More information about the mesa-dev mailing list