[Mesa-dev] [PATCH 7/8] main/cs: Add gl_context::ComputeProgram
Kenneth Graunke
kenneth at whitecape.org
Wed Aug 27 21:40:03 PDT 2014
On Wednesday, August 27, 2014 02:30:16 PM Jordan Justen wrote:
> From: Paul Berry <stereotype441 at gmail.com>
>
> Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> src/mesa/main/mtypes.h | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index cb2a4df..13cdf73 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2351,6 +2351,25 @@ struct gl_fragment_program_state
>
>
> /**
> + * Context state for compute programs.
> + */
> +struct gl_compute_program_state
> +{
> + GLboolean Enabled; /**< GL_ARB_compute_shader */
> + GLboolean _Enabled; /**< Enabled and valid program? */
> + struct gl_compute_program *Current; /**< user-bound compute program */
> +
> + /** Currently enabled and valid program (including internal programs
> + * and compiled shader programs).
> + */
> + struct gl_compute_program *_Current;
> +
> + /** Cache of fixed-function programs */
> + struct gl_program_cache *Cache;
Cache is useless, so you can drop it. It's for fixed function programs, and there definitely aren't any fixed function compute programs :)
> +};
> +
> +
> +/**
> * ATI_fragment_shader runtime state
> */
> #define ATI_FS_INPUT_PRIMARY 0
> @@ -4153,6 +4172,7 @@ struct gl_context
> struct gl_vertex_program_state VertexProgram;
> struct gl_fragment_program_state FragmentProgram;
> struct gl_geometry_program_state GeometryProgram;
> + struct gl_compute_program_state ComputeProgram;
> struct gl_ati_fragment_shader_state ATIFragmentShader;
>
> struct gl_pipeline_shader_state Pipeline; /**< GLSL pipeline shader object state */
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140827/a77e1914/attachment-0001.sig>
More information about the mesa-dev
mailing list