Fixes these MSVC errors.
ir_to_mesa.cpp(2644) : error C2057: expected constant expression
ir_to_mesa.cpp(2644) : error C2466: cannot allocate an array of constant size 0
ir_to_mesa.cpp(2644) : error C2133: 'acp' : unknown size
ir_to_mesa.cpp(2646) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
ir_to_mesa.cpp(2709) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
ir_to_mesa.cpp(2718) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
void
ir_to_mesa_visitor::copy_propagate(void)
{
- ir_to_mesa_instruction *acp[this->next_temp * 4];
+ ir_to_mesa_instruction **acp = new ir_to_mesa_instruction *[this->next_temp * 4];
- memset(&acp, 0, sizeof(acp));
+ memset(acp, 0, sizeof(acp) * this->next_temp * 4);
foreach_iter(exec_list_iterator, iter, this->instructions) {
ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *)iter.get();
}
}
}
+
+ delete [] acp;
}