From: Paul Berry Date: Sat, 11 Jan 2014 05:39:25 +0000 (-0800) Subject: mesa/cs: Add inline functions for dealing with compute shaders. X-Git-Tag: upstream/17.1.0~19122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56d5c5ab5c15a3cace676dcfb362c19fe0591f60;p=platform%2Fupstream%2Fmesa.git mesa/cs: Add inline functions for dealing with compute shaders. Reviewed-by: Jordan Justen Reviewed-by: Kristian Høgsberg Reviewed-by: Kenneth Graunke --- 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