[Mesa-dev] [PATCH] glsl: Add single declaration variables to the symbol table too.

Timothy Arceri timothy.arceri at collabora.com
Sat Mar 5 06:31:25 UTC 2016


On Fri, 2016-03-04 at 21:11 -0800, Kenneth Graunke wrote:
> The lexer/parser use a symbol table to classify identifiers as
> variables, functions, or structure types.
> 
> For some reason, we neglected to add variables in simple declarations
> such as
> 
>     int x = 5;
> 
> but did add subsequent variables in multi-declarations:
> 
>     int x = 5, y = 6; // y gets added, but not x, for some reason
> 
> Fixes Piglit's spec/glsl-1.20/compiler/scoping-struct-vs-
> variable.vert.
> 
> Fixes four dEQP-GLES2.functional.shaders.scoping.valid subcases:
> - local_int_variable_hides_struct_type_vertex
> - local_int_variable_hides_struct_type_fragment
> - local_struct_variable_hides_struct_type_vertex
> - local_struct_variable_hides_struct_type_fragment
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>




More information about the mesa-dev mailing list