i965/vec4: Take into account non-zero reg_offset during register allocation.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 3 Feb 2015 20:50:06 +0000 (22:50 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 10 Feb 2015 17:09:25 +0000 (19:09 +0200)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp

index 80735c33c913b8779737ca6aed43ac6bbbcfb859..46f0bfd085a310bb6bba19fd3d806c312037f89d 100644 (file)
@@ -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;
    }
 }