[Mesa-dev] [PATCH v2 1/5] glsl: Parse shared keyword for compute shader variables

Timothy Arceri timothy.arceri at collabora.com
Mon Nov 9 16:12:36 PST 2015


On Mon, 2015-11-09 at 14:48 -0800, Jordan Justen wrote:
> v2:
>  * Move shared parsing under storage qualifiers (tarceri)
>  * Fail to compile if shared is used in non-compute shader (tarceri)
>  * Use separate shared_storage bit for shared variables (tarceri)
> 
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Timothy Arceri <timothy.arceri at collabora.com>
> ---
> 
> Notes:
>     git://people.freedesktop.org/~jljusten/mesa cs-parse-shared-vars
> -v2
>     http://patchwork.freedesktop.org/bundle/jljusten/cs-parse-shared-
> vars-v2
>     
>     With these environment overrides:
>     
>       export MESA_GL_VERSION_OVERRIDE=4.3
>       export MESA_GLSL_VERSION_OVERRIDE=430
>       export MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader
>     
>     This fixes the piglit test:
>     
>       tests/spec/arb_compute_shader/compiler/shared-variables.comp
> 
>  src/glsl/ast.h          | 1 +
>  src/glsl/ast_to_hir.cpp | 6 ++++++
>  src/glsl/glsl_lexer.ll  | 2 ++
>  src/glsl/glsl_parser.yy | 6 ++++++
>  4 files changed, 15 insertions(+)
> 
> diff --git a/src/glsl/ast.h b/src/glsl/ast.h
> index e803e6d..1b75234 100644
> --- a/src/glsl/ast.h
> +++ b/src/glsl/ast.h
> @@ -448,6 +448,7 @@ struct ast_type_qualifier {
>  	 unsigned patch:1;
>  	 unsigned uniform:1;
>  	 unsigned buffer:1;
> +	 unsigned shared_storage:1;

You also need to add this to ast_type_qualifier::has_storage()

either in this patch or another patch. You can add my r-b to that
change too.


More information about the mesa-dev mailing list