From 773544f0e95e6732e27ce8f6c4567f221f0d2dac Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 31 May 2014 16:27:20 -0700 Subject: glsl: Move ir_type_unset to end of enumeration. Now that the constructors set a type, ir_type_unset is not very useful. Move it to the end of the enum (specifically out of position 0) so that enums checks for dereferences and rvalues can save an instruction. Reviewed-by: Juha-Pekka Heikkila --- src/glsl/ir_validate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glsl/ir_validate.cpp') diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 71defc81593..17a74ea55f5 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -795,7 +795,7 @@ check_node_type(ir_instruction *ir, void *data) { (void) data; - if (ir->ir_type <= ir_type_unset || ir->ir_type >= ir_type_max) { + if (ir->ir_type >= ir_type_max) { printf("Instruction node with unset type\n"); ir->print(); printf("\n"); } -- cgit v1.2.3