All built-in uniforms are supposed to be backed by some GL state. The
state_slots field describes this backing state.
This helped me track down a bug in a later patch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
abort();
}
+ if (ir->data.mode == ir_var_uniform
+ && strncmp(ir->name, "gl_", 3) == 0
+ && ir->state_slots == NULL) {
+ printf("built-in uniform has no state\n");
+ ir->print();
+ abort();
+ }
+
return visit_continue;
}