Nothing overrides it.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/*@{*/
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);
#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"
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
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);
/**
* 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;
_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;
}
_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);