[Mesa-dev] [PATCH 02/18] mesa/cs: Add inline functions for dealing with compute shaders.
Kristian Høgsberg
krh at bitplanet.net
Mon Apr 13 17:22:01 PDT 2015
On Sat, Mar 14, 2015 at 9:54 PM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list