diff options
author | Paul Berry <[email protected]> | 2014-01-10 21:39:25 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2015-05-02 00:34:28 -0700 |
commit | 56d5c5ab5c15a3cace676dcfb362c19fe0591f60 (patch) | |
tree | 2155a9e6475e08a382db12698e29df1e058e7588 /src/mesa/program | |
parent | 6ee4dac1ef7db88b1fd5b27b215fb8baa7bc9c66 (diff) |
mesa/cs: Add inline functions for dealing with compute shaders.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/program.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 |