Re: [Mesa-dev] [PATCH] glsl: Add function parameters to the parser symbol table.

2016-03-04 Thread Timothy Arceri
On Fri, 2016-03-04 at 22:30 -0800, Kenneth Graunke wrote: > In a shader such as: > > struct S { float f; } > float identity(float S) { return S; } > > we would think that "S" in "return S" referred to a structure, even > though it's shadowed by the "float S" parameter in the inner struct.

[Mesa-dev] [PATCH] glsl: Add function parameters to the parser symbol table.

2016-03-04 Thread Kenneth Graunke
In a shader such as: struct S { float f; } float identity(float S) { return S; } we would think that "S" in "return S" referred to a structure, even though it's shadowed by the "float S" parameter in the inner struct. This led to the parser's grammar seeing TYPE_IDENTIFIER and getting co