diff options
author | Marek Olšák <marek.olsak@amd.com> | 2015-09-27 21:28:22 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2015-10-03 22:06:08 +0200 |
commit | b37dcb8c18ec28f1ba0c4f69c4b9680a5db9c2fe (patch) | |
tree | 209688443103afbcc6ecc857a5d05383980cd1eb /src/mesa | |
parent | 95e03033127f9b93b49301adbf5d4b6ddccfa931 (diff) |
mesa: remove Driver.NewShaderProgram
Nothing overrides it.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/dd.h | 1 | ||||
-rw-r--r-- | src/mesa/main/ff_fragment_shader.cpp | 3 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 | ||||
-rw-r--r-- | src/mesa/main/shaderobj.c | 4 | ||||
-rw-r--r-- | src/mesa/main/shaderobj.h | 3 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index a1cdfedd04f..56cfda7091c 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -785,7 +785,6 @@ struct dd_function_table { /*@{*/ struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); - 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 c0030bc5687..e4e2a18c1da 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -32,6 +32,7 @@ #include "main/imports.h" #include "main/macros.h" #include "main/samplerobj.h" +#include "main/shaderobj.h" #include "main/texenvprogram.h" #include "main/texobj.h" #include "main/uniforms.h" @@ -1208,7 +1209,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 82a1ec37130..13fdf8c033b 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 90600fffc4b..0b85f74bf42 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -245,9 +245,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; @@ -438,7 +437,6 @@ void _mesa_init_shader_object_functions(struct dd_function_table *driver) { driver->NewShader = _mesa_new_shader; - 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 8add6425a9a..f40c7fcc5e6 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); |