From 78d3054980edd1a12e56ad0362e889915cff335b Mon Sep 17 00:00:00 2001 From: Fabian Bieler Date: Fri, 7 Mar 2014 10:28:03 +0100 Subject: [PATCH] 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 --- src/mesa/program/program.c | 32 ++++++++++++++++++++++++++++++++ src/mesa/program/program.h | 10 ++++++++++ 2 files changed, 42 insertions(+) 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, -- 2.30.2