mesa: add tessellation shader init functions.
authorFabian Bieler <fabianbieler@fastmail.fm>
Fri, 7 Mar 2014 09:28:03 +0000 (10:28 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jul 2015 22:59:25 +0000 (00:59 +0200)
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>
src/mesa/program/program.c
src/mesa/program/program.h

index c13e61b1630c6b737b66d502aac56b8e68440966..ffad395f3249862e645418788f30a20b6bdf0882 100644 (file)
@@ -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.
  */
index 396a5c89db344c9debd01449b4b81caeb1f20177..eafb969d2a55e735ed29b00606a9b45483ae9801 100644 (file)
@@ -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,