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.
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
#include "ir.h"
|
#include "ir.h"
|
||||||
#include "ir_hierarchical_visitor.h"
|
#include "ir_hierarchical_visitor.h"
|
||||||
#include "hash_table.h"
|
#include "hash_table.h"
|
||||||
|
#include "glsl_types.h"
|
||||||
|
|
||||||
class ir_validate : public ir_hierarchical_visitor {
|
class ir_validate : public ir_hierarchical_visitor {
|
||||||
public:
|
public:
|
||||||
@@ -179,6 +179,7 @@ check_node_type(ir_instruction *ir, void *data)
|
|||||||
printf("Instruction node with unset type\n");
|
printf("Instruction node with unset type\n");
|
||||||
ir->print(); printf("\n");
|
ir->print(); printf("\n");
|
||||||
}
|
}
|
||||||
|
assert(ir->type != glsl_type::error_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user