summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorFabian Bieler <fabianbieler@fastmail.fm>2014-03-07 10:28:03 +0100
committerMarek Olšák <marek.olsak@amd.com>2015-07-23 00:59:25 +0200
commit78d3054980edd1a12e56ad0362e889915cff335b (patch)
tree6375b83ffe03fc4bd0358bc260f030144d510e89 /src/mesa/program
parentbb97cc66c149d0782ec269aab29700252fda9db0 (diff)
downloadexternal_mesa3d-78d3054980edd1a12e56ad0362e889915cff335b.zip
external_mesa3d-78d3054980edd1a12e56ad0362e889915cff335b.tar.gz
external_mesa3d-78d3054980edd1a12e56ad0362e889915cff335b.tar.bz2
mesa: add tessellation shader init functions.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/program.c32
-rw-r--r--src/mesa/program/program.h10
2 files changed, 42 insertions, 0 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index c13e61b..ffad395 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -286,6 +286,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.
*/
struct gl_program *
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index 396a5c8..eafb969 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -79,6 +79,16 @@ _mesa_init_fragment_program(struct gl_context *ctx,
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,
GLenum target, GLuint id);