[Mesa-dev] [PATCH 3/3] glsl: enforce restriction on AoA interface blocks in GLSL ES 3.10

Samuel Iglesias Gonsálvez siglesias at igalia.com
Fri Jun 12 00:17:30 PDT 2015


On 12/06/15 08:52, Timothy Arceri wrote:
> ---
>  src/glsl/ast_to_hir.cpp | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 8236ff9..93e0a82 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -5851,6 +5851,17 @@ ast_interface_block::hir(exec_list *instructions,
>           const glsl_type *block_array_type =
>              process_array_type(&loc, block_type, this->array_specifier, state);
>  
> +          /* From section 4.3.9 (Interface Blocks) of the GLSL ES 3.10 spec:
> +          *
> +          *     * Arrays of arrays of blocks are not allowed
> +          */
> +         if (state->es_shader && block_array_type->is_array() &&
> +             block_array_type->fields.array->is_array()) {
> +            _mesa_glsl_error(&loc, state,
> +                             "arrays of arrays interface blocks are"
> +                             " not allowed");

Put the whitespace at the end of the previous line.

With that change,

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

Sam

> +         }
> +
>           if (this->layout.flags.q.explicit_binding)
>              validate_binding_qualifier(state, &loc, block_array_type,
>                                         &this->layout);
> 


More information about the mesa-dev mailing list