From 56d5c5ab5c15a3cace676dcfb362c19fe0591f60 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 10 Jan 2014 21:39:25 -0800 Subject: mesa/cs: Add inline functions for dealing with compute shaders. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Jordan Justen Reviewed-by: Kristian Høgsberg Reviewed-by: Kenneth Graunke --- src/mesa/program/program.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/mesa/program/program.h') diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h index 0b0d1ac6fee..2d92ab2f118 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 -- cgit v1.2.3