return NULL;
}
- gl_linked_shader *linked = ctx->Driver.NewShader(shader_list[0]->Stage);
+ gl_linked_shader *linked = rzalloc(NULL, struct gl_linked_shader);
+ linked->Stage = shader_list[0]->Stage;
/* Create program and attach it to the linked shader */
struct gl_program *gl_prog =
ctx->Const.MaxUserAssignableUniformLocations =
4 * MESA_SHADER_STAGES * MAX_UNIFORMS;
- ctx->Driver.NewShader = _mesa_new_linked_shader;
ctx->Driver.NewProgram = new_program;
}
return shader;
}
-struct gl_linked_shader *
-_mesa_new_linked_shader(gl_shader_stage stage)
-{
- struct gl_linked_shader *shader;
-
- assert(stage == MESA_SHADER_FRAGMENT || stage == MESA_SHADER_VERTEX);
- shader = rzalloc(NULL, struct gl_linked_shader);
- if (shader) {
- shader->Stage = stage;
- }
- return shader;
-}
-
GLbitfield
_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
{
extern "C" struct gl_shader *
_mesa_new_shader(GLuint name, gl_shader_stage stage);
-extern "C" struct gl_linked_shader *
-_mesa_new_linked_shader(gl_shader_stage stage);
-
extern "C" void
_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh);
struct gl_context *ctx = &local_ctx;
initialize_context_to_defaults(ctx, API_OPENGL_COMPAT);
- ctx->Driver.NewShader = _mesa_new_linked_shader;
ir_variable::temporaries_allocate_names = true;
struct gl_shader *shader = rzalloc(NULL, struct gl_shader);
}
}
-extern "C" struct gl_linked_shader *
-brw_new_shader(gl_shader_stage stage)
-{
- struct gl_linked_shader *shader = rzalloc(NULL, struct gl_linked_shader);
- if (shader) {
- shader->Stage = stage;
- }
-
- return shader;
-}
-
static void
unify_interfaces(struct shader_info **infos)
{
functions->DeleteProgram = brwDeleteProgram;
functions->ProgramStringNotify = brwProgramStringNotify;
- functions->NewShader = brw_new_shader;
functions->LinkShader = brw_link_shader;
functions->MemoryBarrier = brw_memory_barrier;
GLint *bytesWritten);
/*@}*/
- /**
- * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
- */
- /*@{*/
- struct gl_linked_shader *(*NewShader)(gl_shader_stage stage);
- /*@}*/
-
/**
* \name GREMEDY debug/marker functions
*/
}
-/**
- * Allocate a new gl_linked_shader object.
- * Called via ctx->Driver.NewShader()
- */
-struct gl_linked_shader *
-_mesa_new_linked_shader(gl_shader_stage stage)
-{
- struct gl_linked_shader *shader;
- shader = rzalloc(NULL, struct gl_linked_shader);
- if (shader) {
- shader->Stage = stage;
- }
- return shader;
-}
-
-
/**
* Delete a shader object.
*/
void
_mesa_init_shader_object_functions(struct dd_function_table *driver)
{
- driver->NewShader = _mesa_new_linked_shader;
driver->LinkShader = _mesa_ir_link_shader;
}
extern struct gl_shader *
_mesa_new_shader(GLuint name, gl_shader_stage type);
-extern struct gl_linked_shader *
-_mesa_new_linked_shader(gl_shader_stage type);
-
extern void
_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh);