summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp4
1 files changed, 3 insertions, 1 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 80735c33c91..46f0bfd085a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -38,7 +38,9 @@ static void
assign(unsigned int *reg_hw_locations, backend_reg *reg)
{
if (reg->file == GRF) {
- reg->reg = reg_hw_locations[reg->reg];
+ assert(reg->reg_offset >= 0);
+ reg->reg = reg_hw_locations[reg->reg] + reg->reg_offset;
+ reg->reg_offset = 0;
}
}