From: Fabian Bieler Date: Fri, 7 Mar 2014 09:28:03 +0000 (+0100) Subject: mesa: add tessellation shader init functions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78d3054980edd1a12e56ad0362e889915cff335b;p=mesa.git mesa: add tessellation shader init functions. Signed-off-by: Chris Forbes Reviewed-by: Jordan Justen Reviewed-by: Matt Turner Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index c13e61b1630..ffad395f324 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -285,6 +285,38 @@ _mesa_init_compute_program(struct gl_context *ctx, } +/** + * Initialize a new tessellation control program object. + */ +struct gl_program * +_mesa_init_tess_ctrl_program(struct gl_context *ctx, + struct gl_tess_ctrl_program *prog, + GLenum target, GLuint id) +{ + if (prog) { + init_program_struct(&prog->Base, target, id); + return &prog->Base; + } + return NULL; +} + + +/** + * Initialize a new tessellation evaluation program object. + */ +struct gl_program * +_mesa_init_tess_eval_program(struct gl_context *ctx, + struct gl_tess_eval_program *prog, + GLenum target, GLuint id) +{ + if (prog) { + init_program_struct(&prog->Base, target, id); + return &prog->Base; + } + return NULL; +} + + /** * Initialize a new geometry program object. */ diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h index 396a5c89db3..eafb969d2a5 100644 --- a/src/mesa/program/program.h +++ b/src/mesa/program/program.h @@ -78,6 +78,16 @@ _mesa_init_fragment_program(struct gl_context *ctx, struct gl_fragment_program *prog, GLenum target, GLuint id); +extern struct gl_program * +_mesa_init_tess_ctrl_program(struct gl_context *ctx, + struct gl_tess_ctrl_program *prog, + GLenum target, GLuint id); + +extern struct gl_program * +_mesa_init_tess_eval_program(struct gl_context *ctx, + struct gl_tess_eval_program *prog, + GLenum target, GLuint id); + extern struct gl_program * _mesa_init_geometry_program(struct gl_context *ctx, struct gl_geometry_program *prog,