summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glsl/ast_function.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index d7d1b3eeb7..0c9f890038 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -1151,7 +1151,8 @@ ast_function_expression::hir(exec_list *instructions,
* arguments to provide an initializer for every component in the
* constructed value."
*/
- if ((components_used < type_components) && (components_used != 1)) {
+ if (components_used < type_components && components_used != 1
+ && matrix_parameters == 0) {
_mesa_glsl_error(& loc, state, "too few components to construct "
"`%s'",
constructor_type->name);