[Mesa-dev] [PATCH v2 06/15] glsl parser: allow in & out for interface block members
Eric Anholt
eric at anholt.net
Wed Mar 20 17:32:03 PDT 2013
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
Could 7/15 get easily moved before this one, so that we don't allow
uniforms in our in/out blocks at this commit?
I'm done for the evening. Patches 1-5 are (other than minor comments):
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130320/185a2869/attachment.pgp>
More information about the mesa-dev
mailing list