[Mesa-dev] [PATCH v2 02/20] mesa/cs: Add inline functions for dealing with compute shaders.

Jordan Justen jordan.l.justen at intel.com
Fri Apr 24 16:32:54 PDT 2015


From: Paul Berry <stereotype441 at gmail.com>

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
---
 src/mesa/program/program.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index 0b0d1ac..2d92ab2 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -138,6 +138,15 @@ _mesa_reference_geomprog(struct gl_context *ctx,
                            (struct gl_program *) prog);
 }
 
+static inline void
+_mesa_reference_compprog(struct gl_context *ctx,
+                         struct gl_compute_program **ptr,
+                         struct gl_compute_program *prog)
+{
+   _mesa_reference_program(ctx, (struct gl_program **) ptr,
+                           (struct gl_program *) prog);
+}
+
 extern struct gl_program *
 _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog);
 
@@ -276,6 +285,19 @@ gl_geometry_program_const(const struct gl_program *prog)
 }
 
 
+static inline struct gl_compute_program *
+gl_compute_program(struct gl_program *prog)
+{
+   return (struct gl_compute_program *) prog;
+}
+
+static inline const struct gl_compute_program *
+gl_compute_program_const(const struct gl_program *prog)
+{
+   return (const struct gl_compute_program *) prog;
+}
+
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
-- 
2.1.4



More information about the mesa-dev mailing list