[Mesa-dev,06/46] mesa: add tessellation shader init functions.

Submitted by Marek Olšák on June 16, 2015, 11:01 p.m.

Details

Message ID 1434495702-27901-6-git-send-email-maraeo@gmail.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Marek Olšák June 16, 2015, 11:01 p.m.
From: Fabian Bieler <fabianbieler@fastmail.fm>

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
---
 src/mesa/program/program.c | 32 ++++++++++++++++++++++++++++++++
 src/mesa/program/program.h | 10 ++++++++++
 2 files changed, 42 insertions(+)

Patch hide | download patch | download mbox

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);