aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
committermarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
commitd6d3999ccb2cb72d55820770260172eccbbb68d7 (patch)
tree568ce82dd1a8e2edbbe8cd4cb5ab5b14157f34f6 /mesalib/src/glsl/glsl_parser.yy
parentfffd436e9c2ec6f5aa501ee57d0e4ade7293ee60 (diff)
downloadvcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.gz
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.bz2
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.zip
libX11 xserver pixman mesa git update 16 Apr 2012
Diffstat (limited to 'mesalib/src/glsl/glsl_parser.yy')
-rw-r--r--mesalib/src/glsl/glsl_parser.yy20
1 files changed, 20 insertions, 0 deletions
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index 920213c30..5753acf3c 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -1103,8 +1103,14 @@ layout_qualifier_id_list:
if ($1.flags.q.explicit_location)
$$.location = $1.location;
+ if ($1.flags.q.explicit_index)
+ $$.index = $1.index;
+
if ($3.flags.q.explicit_location)
$$.location = $3.location;
+
+ if ($3.flags.q.explicit_index)
+ $$.index = $3.index;
}
;
@@ -1191,6 +1197,20 @@ layout_qualifier_id:
YYERROR;
}
}
+
+ if (strcmp("index", $1) == 0) {
+ got_one = true;
+
+ $$.flags.q.explicit_index = 1;
+
+ if ($3 >= 0) {
+ $$.index = $3;
+ } else {
+ _mesa_glsl_error(& @3, state,
+ "invalid index %d specified\n", $3);
+ YYERROR;
+ }
+ }
}
/* If the identifier didn't match any known layout identifiers,