summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ast_to_hir.cpp2
-rw-r--r--src/glsl/glsl_parser.yy2
-rw-r--r--src/glsl/glsl_parser_extras.cpp4
-rw-r--r--src/glsl/glsl_parser_extras.h5
4 files changed, 7 insertions, 6 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 2316cf8e5e4..0859d9e00a3 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2842,7 +2842,7 @@ ast_declarator_list::hir(exec_list *instructions,
* any extension that adds the 'layout' keyword.
*/
if (!state->is_version(130, 300)
- && !state->ARB_explicit_attrib_location_enable
+ && !state->has_explicit_attrib_location()
&& !state->ARB_fragment_coord_conventions_enable) {
if (this->type->qualifier.flags.q.out) {
_mesa_glsl_error(& loc, state,
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index fa6e2053adf..56ca4ad8b07 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1262,7 +1262,7 @@ layout_qualifier_id:
{
memset(& $$, 0, sizeof($$));
- if (state->ARB_explicit_attrib_location_enable) {
+ if (state->has_explicit_attrib_location()) {
if (strcmp("location", $1) == 0) {
$$.flags.q.explicit_location = 1;
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index cac5a18e474..a2b52ef004f 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -303,10 +303,6 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
if (this->language_version >= 140) {
this->ARB_uniform_buffer_object_enable = true;
}
-
- if (this->language_version == 300 && this->es_shader) {
- this->ARB_explicit_attrib_location_enable = true;
- }
}
extern "C" {
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 364a983458a..27ebbcff88e 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -121,6 +121,11 @@ struct _mesa_glsl_parse_state {
return check_version(130, 300, locp, "bit-wise operations are forbidden");
}
+ bool has_explicit_attrib_location() const
+ {
+ return ARB_explicit_attrib_location_enable || is_version(330, 300);
+ }
+
void process_version_directive(YYLTYPE *locp, int version,
const char *ident);