ast_function: Remove unnecessary check for empty constructors.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Jul 2010 00:59:56 +0000 (17:59 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Jul 2010 16:46:29 +0000 (09:46 -0700)
This case is already caught by a later check that ensures sufficient
components were provided, based on the type.

src/glsl/ast_function.cpp

index b68111538798245e3b4e52ca78c62160d314b67d..c6cc3eb43c2163213a3de072d7362b1de54b81ee 100644 (file)
@@ -923,15 +923,6 @@ ast_function_expression::hir(exec_list *instructions,
 
         bool all_parameters_are_constant = true;
 
-        /* This handles invalid constructor calls such as 'vec4 v = vec4();'
-         */
-        if (this->expressions.is_empty()) {
-           _mesa_glsl_error(& loc, state, "too few components to construct "
-                            "`%s'",
-                            constructor_type->name);
-           return ir_call::get_error_instruction(ctx);
-        }
-
         foreach_list (n, &this->expressions) {
            ast_node *ast = exec_node_data(ast_node, n, link);
            ir_rvalue *result =