i965: Assert that an OPCODE_IF was seen before an OPCODE_ELSE.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs_emit.c
index 227261409c431e5278eb38c0baa98b9de1584977..7adb7956c72a68fc36335d212ba25ce244e8486f 100644 (file)
@@ -1657,6 +1657,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
         if_depth++;
         break;
       case OPCODE_ELSE:
+        assert(if_depth > 0);
         if_inst[if_depth-1] = brw_ELSE(p, if_inst[if_depth-1]);
         break;
       case OPCODE_ENDIF: