summaryrefslogtreecommitdiff
path: root/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-20 17:18:57 -0700
committerEric Anholt <eric@anholt.net>2010-07-20 17:30:10 -0700
commitf141fa63a4391621cc92cd2c39724a952b297a58 (patch)
treeb85acfcd939e7f62bc0c0a00104fe1358f68ae3f /src/glsl/ir_validate.cpp
parentfade78edcbff1e0ae24a1e2c455be2cc7932ee9c (diff)
glsl2: Check that nodes in a valid tree aren't error-type.
We're good at propagating error types around, but finding when the first one was triggered can be painful if we aren't paying attention.
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r--src/glsl/ir_validate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 8a567954a1f..c05edf2ee3d 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -37,7 +37,7 @@
#include "ir.h"
#include "ir_hierarchical_visitor.h"
#include "hash_table.h"
-
+#include "glsl_types.h"
class ir_validate : public ir_hierarchical_visitor {
public:
@@ -179,6 +179,7 @@ check_node_type(ir_instruction *ir, void *data)
printf("Instruction node with unset type\n");
ir->print(); printf("\n");
}
+ assert(ir->type != glsl_type::error_type);
}
void