summaryrefslogtreecommitdiff
path: root/src/glsl/ir_reader.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-08-12 13:17:53 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-08-13 19:09:35 -0700
commitd802ba110f78c3eee9541867cde819ada1b2c449 (patch)
tree7817ac18c6373a4682663cd8059e336220c31740 /src/glsl/ir_reader.cpp
parentd01bf822dd7f28dc56705407e7c3b9de1f292794 (diff)
ir_reader: Don't mark functions as defined if their body is empty.
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r--src/glsl/ir_reader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 14bd2d62fd..2def3efff5 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -297,7 +297,7 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
sig->replace_parameters(&hir_parameters);
- if (!skip_body) {
+ if (!skip_body && !body_list->subexpressions.is_empty()) {
if (sig->is_defined) {
ir_read_error(st, list, "function %s redefined", f->name);
return;