aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast_to_hir.cpp
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/ast_to_hir.cpp
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/ast_to_hir.cpp')
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index f4dfc4ce3..820c86c5e 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -2092,14 +2092,21 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
} else {
var->location = qual->location;
}
+ if (qual->flags.q.explicit_index) {
+ var->explicit_index = true;
+ var->index = qual->index;
+ }
}
+ } else if (qual->flags.q.explicit_index) {
+ _mesa_glsl_error(loc, state,
+ "explicit index requires explicit location\n");
}
/* Does the declaration use the 'layout' keyword?
*/
const bool uses_layout = qual->flags.q.pixel_center_integer
|| qual->flags.q.origin_upper_left
- || qual->flags.q.explicit_location;
+ || qual->flags.q.explicit_location; /* no need for index since it relies on location */
/* Does the declaration use the deprecated 'attribute' or 'varying'
* keywords?