[Mesa-dev] [PATCH] glsl: Remove unreachable error message

Timothy Arceri t_arceri at yahoo.com.au
Sat Nov 23 15:38:47 PST 2013


Just to clarify unsized arrays cannot be assigned so var->max_array_access 
will always be 0 as redecorations are already handled before this point by 
get_variable_being_redeclared()

On Wed, 2013-11-20 at 22:41 +1100, Timothy Arceri wrote:
> Left over from bug #34376.
> 
> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>  src/glsl/ast_to_hir.cpp | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 76b256c..adf10a0 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -813,13 +813,6 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
>  
>  	 assert(var != NULL);
>  
> -	 if (var->max_array_access >= unsigned(rhs->type->array_size())) {
> -	    /* FINISHME: This should actually log the location of the RHS. */
> -	    _mesa_glsl_error(& lhs_loc, state, "array size must be > %u due to "
> -			     "previous access",
> -			     var->max_array_access);
> -	 }
> -
>  	 var->type = glsl_type::get_array_instance(lhs->type->element_type(),
>  						   rhs->type->array_size());
>  	 d->type = var->type;





More information about the mesa-dev mailing list