[Mesa-dev] [PATCH v2 05/15] glsl parser: on desktop GL require GLSL 150 for instance names

Eric Anholt eric at anholt.net
Wed Mar 20 17:21:00 PDT 2013


Jordan Justen <jordan.l.justen at intel.com> writes:

> Interface blocks in GLSL 150 allow an instance name to be used.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/glsl/glsl_parser.yy |   15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index 8e6b04d..1fd8cc2 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1953,11 +1953,16 @@ basic_interface_block:
>  	    * the same language versions, we don't have to explicitly
>  	    * version-check both things.
>  	    */
> -	   if (block->instance_name != NULL
> -	       && !(state->language_version == 300 && state->es_shader)) {
> -	      _mesa_glsl_error(& @1, state,
> -			       "#version 300 es required for using uniform "
> -			       "blocks with an instance name\n");
> +	   if (block->instance_name != NULL) {
> +	      if(state->es_shader && state->language_version < 300) {
                ^ missing space

-------------- 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/60b04b34/attachment.pgp>


More information about the mesa-dev mailing list