summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-08-11 09:17:18 -0700
committerEric Anholt <eric@anholt.net>2011-08-16 13:04:43 -0700
commite8980c61b2932cd4c8791fcc5afdb54fa033c224 (patch)
tree77b86f0579ff90da46da318f7397596788cee47d /src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
parent193a9a209d5121e2c20f1d20c61587b1e3d0603d (diff)
downloadexternal_mesa3d-e8980c61b2932cd4c8791fcc5afdb54fa033c224.zip
external_mesa3d-e8980c61b2932cd4c8791fcc5afdb54fa033c224.tar.gz
external_mesa3d-e8980c61b2932cd4c8791fcc5afdb54fa033c224.tar.bz2
i965/vs: Fix the trivial register allocator's failure path.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
index 1bfd84d..d5fd21d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -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);
}
}