summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-11-29 21:21:56 +1300
committerChris Forbes <[email protected]>2013-12-07 17:14:39 +1300
commit51aa15aca2bf5764b8cd62bbf2329eda40f7a859 (patch)
tree93f13b8280c101da3a69ec0d9e8f251b4bd9582c /src/glsl/glsl_parser.yy
parenta1ca5802401c384c1eadbf72cf910c65e377600c (diff)
glsl: Add frontend support for `sample` auxiliary storage qualifier
Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r--src/glsl/glsl_parser.yy9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index ada3690f609..10165547924 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1521,7 +1521,7 @@ type_qualifier:
{
if ($2.has_auxiliary_storage()) {
_mesa_glsl_error(&@1, state,
- "duplicate auxiliary storage qualifier (centroid)");
+ "duplicate auxiliary storage qualifier (centroid or sample)");
}
if (!state->ARB_shading_language_420pack_enable &&
@@ -1571,7 +1571,12 @@ auxiliary_storage_qualifier:
memset(& $$, 0, sizeof($$));
$$.flags.q.centroid = 1;
}
- /* TODO: "sample" and "patch" also go here someday. */
+ | SAMPLE
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.sample = 1;
+ }
+ /* TODO: "patch" also goes here someday. */
storage_qualifier:
CONST_TOK