summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-30 17:04:48 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-30 17:04:48 -0700
commita80cbd6d82f6ec4c1d16129581d5fa893a6ba94f (patch)
tree2262b77abb95052874286d1c8ca5deb380c5910a /ast_to_hir.cpp
parent28009cd75cd3328774bd80a5b87a255ac881a710 (diff)
Forbid array comparisons in GLSL 1.10
This causes the following tests to pass: glslparsertest/shaders/array3.frag
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index 23021bf04c..e037af7137 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -666,6 +666,11 @@ ast_expression::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state, "operands of `%s' must have the same "
"type", (this->oper == ast_equal) ? "==" : "!=");
error_emitted = true;
+ } else if ((state->language_version <= 110)
+ && (op[0]->type->is_array() || op[1]->type->is_array())) {
+ _mesa_glsl_error(& loc, state, "array comparisons forbidden in "
+ "GLSL 1.10");
+ error_emitted = true;
}
result = new ir_expression(operations[this->oper], glsl_type::bool_type,