[Mesa-dev] [PATCH 09/17] glsl_symbol_table: add interface block namespaces

Jordan Justen jljusten at gmail.com
Mon Apr 22 08:15:45 PDT 2013


On Sun, Apr 21, 2013 at 12:30 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 04/19/2013 12:35 PM, Jordan Justen wrote:
>>
>> For interface blocks, there are three separate namespaces for
>> uniform, input and output blocks.
>
>
> http://knowyourmeme.com/photos/2109
>
> There are?
>
> Similarly, for your next patch:
> "Uniform/interface blocks are a separate namespace from types."
>
> They are?

I should definitely add some spec references to this commit.

Anyway, this is tested by my proposed piglit test:
glsl-1.50: allow the same name for uniform and varying interface
And, I actually properly referenced the spec there. :)

GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
"A block name is allowed to have different definitions in different
 interfaces."

Which kind of confused me until I read:
GLSLangSpec.4.30.8, 4.3.9 Interface Blocks:
"A block name is allowed to have different definitions in different
 interfaces within the same shader, allowing, for example, an input
 block and output block to have the same name."

Did I misinterpreted this text?

Thanks,

-Jordan

> As I understand it, variables, structure types (constructors), function
> names, UBO block names, and interface block instance names are all in a
> single namespace as of GLSL 1.20+.
>
> I can't find any text to indicate that there are multiple namespaces...maybe
> I'm just being dense, but could you point me at what you found?
>
> --Ken
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list