mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 03:30:22 +01:00
glsl: Validate that built-in uniforms have backing state
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>
This commit is contained in:
parent
8786544b3e
commit
77005cfabd
1 changed files with 8 additions and 0 deletions
|
|
@ -700,6 +700,14 @@ ir_validate::visit(ir_variable *ir)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue