mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 04:50:11 +01:00
i965/vs: Fix the trivial register allocator's failure path.
This commit is contained in:
parent
193a9a209d
commit
e8980c61b2
2 changed files with 5 additions and 3 deletions
|
|
@ -561,6 +561,9 @@ vec4_visitor::run()
|
|||
setup_payload();
|
||||
reg_allocate();
|
||||
|
||||
if (failed)
|
||||
return false;
|
||||
|
||||
brw_set_access_mode(p, BRW_ALIGN_16);
|
||||
|
||||
generate_code();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ assign(int *reg_hw_locations, reg *reg)
|
|||
void
|
||||
vec4_visitor::reg_allocate_trivial()
|
||||
{
|
||||
int last_grf = 0;
|
||||
int hw_reg_mapping[this->virtual_grf_count];
|
||||
bool virtual_grf_used[this->virtual_grf_count];
|
||||
int i;
|
||||
|
|
@ -84,9 +83,9 @@ vec4_visitor::reg_allocate_trivial()
|
|||
assign(hw_reg_mapping, &inst->src[2]);
|
||||
}
|
||||
|
||||
if (last_grf >= BRW_MAX_GRF) {
|
||||
if (prog_data->total_grf > BRW_MAX_GRF) {
|
||||
fail("Ran out of regs on trivial allocator (%d/%d)\n",
|
||||
last_grf, BRW_MAX_GRF);
|
||||
prog_data->total_grf, BRW_MAX_GRF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue