[Mesa-dev] [PATCH 12/15] mesa: Remove context parameter from dd_function_table::NewShaderProgram

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


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

This fixes some unused parameter warnings introduced by the previous
commit.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/dd.h                   | 3 +--
 src/mesa/main/ff_fragment_shader.cpp | 2 +-
 src/mesa/main/shaderapi.c            | 2 +-
 src/mesa/main/shaderobj.c            | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index c07e83a..2f40915 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -758,8 +758,7 @@ struct dd_function_table {
    struct gl_shader *(*NewShader)(struct gl_context *ctx,
                                   GLuint name, GLenum type);
    void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
-   struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx,
-                                                 GLuint name);
+   struct gl_shader_program *(*NewShaderProgram)(GLuint name);
    void (*DeleteShaderProgram)(struct gl_context *ctx,
                                struct gl_shader_program *shProg);
    void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index e31a145..5591d57 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -1212,7 +1212,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
    p.top_instructions = p.shader->ir;
    p.instructions = p.shader->ir;
    p.state = key;
-   p.shader_program = ctx->Driver.NewShaderProgram(ctx, 0);
+   p.shader_program = ctx->Driver.NewShaderProgram(0);
 
    /* Tell the linker to ignore the fact that we're building a
     * separate shader, in case we're in a GLES2 context that would
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 3e6f610..2be9092 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -316,7 +316,7 @@ create_shader_program(struct gl_context *ctx)
 
    name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
 
-   shProg = ctx->Driver.NewShaderProgram(ctx, name);
+   shProg = ctx->Driver.NewShaderProgram(name);
 
    _mesa_HashInsert(ctx->Shared->ShaderObjects, name, shProg);
 
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index ce9aa09..81bd782 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -261,7 +261,7 @@ init_shader_program(struct gl_shader_program *prog)
  * Called via ctx->Driver.NewShaderProgram()
  */
 static struct gl_shader_program *
-_mesa_new_shader_program(struct gl_context *ctx, GLuint name)
+_mesa_new_shader_program(GLuint name)
 {
    struct gl_shader_program *shProg;
    shProg = rzalloc(NULL, struct gl_shader_program);
-- 
1.8.1.4



More information about the mesa-dev mailing list