summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-31 16:25:21 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-31 16:25:21 -0700
commitb6326abb859550963446affe9123085fd57f9525 (patch)
tree371f29b05e33fb3111da07bbd1ae04d8e16bc020
parent3e0ef5f81b08a1496d952d3673b614497be9c75a (diff)
Reject array constructor calls in GLSL 1.10
-rw-r--r--ast_function.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ast_function.cpp b/ast_function.cpp
index f8c2b6eaa2..74ae5d8962 100644
--- a/ast_function.cpp
+++ b/ast_function.cpp
@@ -190,6 +190,15 @@ ast_function_expression::hir(exec_list *instructions,
return ir_call::get_error_instruction();
}
+ if (constructor_type->is_array()) {
+ if (state->language_version <= 110) {
+ _mesa_glsl_error(& loc, state,
+ "array constructors forbidden in GLSL 1.10");
+ return ir_call::get_error_instruction();
+ }
+
+ return ir_call::get_error_instruction();
+ }
/* There are two kinds of constructor call. Constructors for built-in
* language types, such as mat4 and vec2, are free form. The only