[Mesa-dev] [PATCH 06/11] glsl: can't have 'const' qualifier used with struct or interface block members

Ian Romanick idr at freedesktop.org
Mon Jan 19 19:00:18 PST 2015


On 01/19/2015 03:32 AM, Eduardo Lima Mitev wrote:
> From: Iago Toral Quiroga <itoral at igalia.com>
> 
> Fixes the following 2 dEQP tests:
> dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block_const_vertex
> dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block_const_fragment

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>  src/glsl/ast_to_hir.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 678638d..c52e4af 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -5207,6 +5207,13 @@ ast_process_structure_or_interface_block(exec_list *instructions,
>                               "members");
>           }
>  
> +         if (qual->flags.q.constant) {
> +            YYLTYPE loc = decl_list->get_location();
> +            _mesa_glsl_error(&loc, state,
> +                             "const storage qualifier cannot be applied "
> +                             "to struct or interface block members");
> +         }
> +
>           field_type = process_array_type(&loc, decl_type,
>                                           decl->array_specifier, state);
>           fields[i].type = field_type;
> 



More information about the mesa-dev mailing list