[Mesa-dev] [PATCH 04/23] mesa: remove Driver.NewShaderProgram
Marek Olšák
maraeo at gmail.com
Sun Sep 27 15:20:33 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
Nothing overrides it.
---
src/mesa/main/dd.h | 1 -
src/mesa/main/ff_fragment_shader.cpp | 2 +-
src/mesa/main/shaderapi.c | 2 +-
src/mesa/main/shaderobj.c | 4 +---
src/mesa/main/shaderobj.h | 3 +++
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 95831d1..64f2a34 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -783,7 +783,6 @@ struct dd_function_table {
* \name GLSL-related functions (ARB extensions and OpenGL 2.x)
*/
/*@{*/
- 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 d666829..d086c68 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -1211,7 +1211,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(0);
+ p.shader_program = _mesa_new_shader_program(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 8c77858..13e8d74 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -320,7 +320,7 @@ create_shader_program(struct gl_context *ctx)
name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
- shProg = ctx->Driver.NewShaderProgram(name);
+ shProg = _mesa_new_shader_program(name);
_mesa_HashInsert(ctx->Shared->ShaderObjects, name, shProg);
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 885746c..67120c5 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -244,9 +244,8 @@ init_shader_program(struct gl_shader_program *prog)
/**
* Allocate a new gl_shader_program object, initialize it.
- * Called via ctx->Driver.NewShaderProgram()
*/
-static struct gl_shader_program *
+struct gl_shader_program *
_mesa_new_shader_program(GLuint name)
{
struct gl_shader_program *shProg;
@@ -436,7 +435,6 @@ _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
void
_mesa_init_shader_object_functions(struct dd_function_table *driver)
{
- driver->NewShaderProgram = _mesa_new_shader_program;
driver->DeleteShaderProgram = _mesa_delete_shader_program;
driver->LinkShader = _mesa_ir_link_shader;
}
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index 8add642..f40c7fc 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -92,6 +92,9 @@ extern struct gl_shader_program *
_mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
const char *caller);
+extern struct gl_shader_program *
+_mesa_new_shader_program(GLuint name);
+
extern void
_mesa_clear_shader_program_data(struct gl_shader_program *shProg);
--
2.1.4
More information about the mesa-dev
mailing list