From 64fde7b31c419685aa8ef6060828e21b9a11ef51 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 3 Feb 2015 22:50:06 +0200 Subject: [PATCH] i965/vec4: Take into account non-zero reg_offset during register allocation. Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 80735c3..46f0bfd 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; } } -- 2.7.4