diff options
author | Ian Romanick <[email protected]> | 2011-01-25 11:50:04 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-01-25 13:41:26 -0800 |
commit | 5c2cec8337c5afc6941cd5c0bcedd27ff99b1bc7 (patch) | |
tree | 74cba39877306f8d8fcca03e0ee4c6778ab77594 /src/mesa/program/ir_to_mesa.cpp | |
parent | 9f2bf3d65cf0745a34185c1966d52389fbd1ca90 (diff) |
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.
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 786fdfbd231..ee3eae6cfb0 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -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; |