mesa: remove Driver.NewShaderProgram
authorMarek Olšák <marek.olsak@amd.com>
Sun, 27 Sep 2015 19:28:22 +0000 (21:28 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 3 Oct 2015 20:06:08 +0000 (22:06 +0200)
Nothing overrides it.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/dd.h
src/mesa/main/ff_fragment_shader.cpp
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.c
src/mesa/main/shaderobj.h

index a1cdfedd04f4c106fb9611968ee3997701384b61..56cfda7091cb4ff2526d5185cb44eb38168b2d46 100644 (file)
@@ -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);
index c0030bc56878a5eb4326bf87786795b27fd9d752..e4e2a18c1da214a1f85b1b3246965cc5d555af37 100644 (file)
@@ -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
index 82a1ec371303cb88c2dabc831cb3a260f137a848..13fdf8c033bd2b4d79014cfd90797d1374740361 100644 (file)
@@ -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);
 
index 90600fffc4b3b7055bff510f2eb2a86465318005..0b85f74bf42980f69146165993c701d7c01d8d5c 100644 (file)
@@ -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;
 }
index 8add6425a9ab8d014a3b486fae9220a47aeb85fa..f40c7fcc5e6ed2d69f2b7d0cbdfd0d4d448d657c 100644 (file)
@@ -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);