[Mesa-dev] [PATCH v2 06/15] glsl parser: allow in & out for interface block members

Jordan Justen jljusten at gmail.com
Fri Mar 22 20:48:52 PDT 2013


On Wed, Mar 20, 2013 at 5:32 PM, Eric Anholt <eric at anholt.net> wrote:
> Jordan Justen <jordan.l.justen at intel.com> writes:
>
>> Previously uniform blocks allowed for the 'uniform' keyword
>> to be used with members of a uniform blocks. With interface
>> blocks 'in' can be used on 'in' interface block members and
>> 'out' can be used on 'out' interface block members.
>>
>> The basic_interface_block rule will verify that the same
>> qualifier type is used with the block and each member.
>
>> -        type->qualifier = $1;
>> -        type->qualifier.flags.q.uniform = true;
>> -        type->specifier = $3;
>> +        if (!type->qualifier.merge_qualifier(& @1, state, $1)) {
>> +           YYERROR;
>> +        }
>> +
>> +        if (type->qualifier.flags.q.attribute) {
>> +           _mesa_glsl_error(& @1, state,
>> +                           "keyword 'attribute' cannot be used with "
>> +                           "interface block member\n");
>> +        } else if (type->qualifier.flags.q.varying) {
>> +           _mesa_glsl_error(& @1, state,
>> +                           "keyword 'varying' cannot be used with "
>> +                           "interface block member\n");
>> +        }
>
> I think some more qualifiers are getting allowed now, are they all intentional?
>
> - invariant
> - smooth
> - flat
> - noperspective

Hmm. Yeah this seems off. I'll look into it.

> Could 7/15 get easily moved before this one, so that we don't allow
> uniforms in our in/out blocks at this commit?

Will do.

Thanks!

-Jordan


More information about the mesa-dev mailing list