summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_program.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-10-05 22:13:34 +0200
committerMarek Olšák <[email protected]>2015-10-09 22:02:19 +0200
commitd695c676ea61f48f121969462ece708b739a02c0 (patch)
treee08489b8301d855b261720ae2034b2b137a6c359 /src/mesa/state_tracker/st_cb_program.c
parent092f0427dcc15e36666f24c817957727632ed377 (diff)
program: remove _mesa_init_*_program wrappers
They didn't do anything useful. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_program.c')
-rw-r--r--src/mesa/state_tracker/st_cb_program.c43
1 files changed, 18 insertions, 25 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 003ce336fd4..40f2af0e550 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -102,36 +102,29 @@ st_use_program(struct gl_context *ctx, struct gl_shader_program *shProg)
static struct gl_program *
st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
{
- switch (target) {
- case GL_VERTEX_PROGRAM_ARB: {
- struct st_vertex_program *prog = ST_CALLOC_STRUCT(st_vertex_program);
- return _mesa_init_vertex_program(ctx, &prog->Base, target, id);
- }
-
- case GL_FRAGMENT_PROGRAM_ARB: {
- struct st_fragment_program *prog = ST_CALLOC_STRUCT(st_fragment_program);
- return _mesa_init_fragment_program(ctx, &prog->Base, target, id);
- }
-
- case GL_GEOMETRY_PROGRAM_NV: {
- struct st_geometry_program *prog = ST_CALLOC_STRUCT(st_geometry_program);
- return _mesa_init_geometry_program(ctx, &prog->Base, target, id);
- }
-
- case GL_TESS_CONTROL_PROGRAM_NV: {
- struct st_tessctrl_program *prog = ST_CALLOC_STRUCT(st_tessctrl_program);
- return _mesa_init_tess_ctrl_program(ctx, &prog->Base, target, id);
- }
-
- case GL_TESS_EVALUATION_PROGRAM_NV: {
- struct st_tesseval_program *prog = ST_CALLOC_STRUCT(st_tesseval_program);
- return _mesa_init_tess_eval_program(ctx, &prog->Base, target, id);
- }
+ struct gl_program *prog;
+ switch (target) {
+ case GL_VERTEX_PROGRAM_ARB:
+ prog = (struct gl_program*)ST_CALLOC_STRUCT(st_vertex_program);
+ break;
+ case GL_FRAGMENT_PROGRAM_ARB:
+ prog = (struct gl_program*)ST_CALLOC_STRUCT(st_fragment_program);
+ break;
+ case GL_GEOMETRY_PROGRAM_NV:
+ prog = (struct gl_program*)ST_CALLOC_STRUCT(st_geometry_program);
+ break;
+ case GL_TESS_CONTROL_PROGRAM_NV:
+ prog = (struct gl_program*)ST_CALLOC_STRUCT(st_tessctrl_program);
+ break;
+ case GL_TESS_EVALUATION_PROGRAM_NV:
+ prog = (struct gl_program*)ST_CALLOC_STRUCT(st_tesseval_program);
+ break;
default:
assert(0);
return NULL;
}
+ return _mesa_init_gl_program(prog, target, id);
}