mesa/cs: Add inline functions for dealing with compute shaders.
authorPaul Berry <stereotype441@gmail.com>
Sat, 11 Jan 2014 05:39:25 +0000 (21:39 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Sat, 2 May 2015 07:34:28 +0000 (00:34 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/program/program.h

index 0b0d1ac6feec53e8c210b1c8a956bf66e4e319cb..2d92ab2f11848308e020042912350ec23f63e36d 100644 (file)
@@ -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