[Mesa-dev] [PATCH 7/8] main/cs: Add gl_context::ComputeProgram

Ian Romanick idr at freedesktop.org
Wed Aug 27 15:17:14 PDT 2014


On 08/27/2014 02:30 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? */

Are either of these API visible?  If not, s/GLboolean/bool/.

> +   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;
> +};
> +
> +
> +/**
>   * 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 */
> 



More information about the mesa-dev mailing list