mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 12:50:12 +01:00
ir_to_mesa: Add several assertions about sizes of arrays
Both of these assertions are triggered by the test case in bugzilla size of 0.
This commit is contained in:
parent
9f2bf3d65c
commit
5c2cec8337
1 changed files with 4 additions and 0 deletions
|
|
@ -651,6 +651,7 @@ type_size(const struct glsl_type *type)
|
|||
return 1;
|
||||
}
|
||||
case GLSL_TYPE_ARRAY:
|
||||
assert(type->length > 0);
|
||||
return type_size(type->fields.array) * type->length;
|
||||
case GLSL_TYPE_STRUCT:
|
||||
size = 0;
|
||||
|
|
@ -2653,6 +2654,9 @@ ir_to_mesa_visitor::copy_propagate(void)
|
|||
foreach_iter(exec_list_iterator, iter, this->instructions) {
|
||||
ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *)iter.get();
|
||||
|
||||
assert(inst->dst_reg.file != PROGRAM_TEMPORARY
|
||||
|| inst->dst_reg.index < this->next_temp);
|
||||
|
||||
/* First, do any copy propagation possible into the src regs. */
|
||||
for (int r = 0; r < 3; r++) {
|
||||
ir_to_mesa_instruction *first = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue