summaryrefslogtreecommitdiff
path: root/src/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-07-08 17:59:56 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-07-09 09:46:29 -0700
commit59df3385e1c413332c75be5d0e7751972d45430e (patch)
tree26c9ffd7be660519aba96d3c5dfb58a13ded8d05 /src/glsl/ast_function.cpp
parenta4dde28ee6893ab99c6ca93699392bb8bc2d981c (diff)
ast_function: Remove unnecessary check for empty constructors.
This case is already caught by a later check that ensures sufficient components were provided, based on the type.
Diffstat (limited to 'src/glsl/ast_function.cpp')
-rw-r--r--src/glsl/ast_function.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index b681115387..c6cc3eb43c 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -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 =