965: count grf allocation correctly for wm prog, first aub triangle
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 15:48:53 +0000 (15:48 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 15:48:53 +0000 (15:48 +0000)
src/mesa/pipe/i965simple/brw_wm_decl.c

index 392f17fad67fea4fed7acdf4f4dec5b1da8480f6..5b1abb9d4892ec546318b976c9a2677dff7e5b2e 100644 (file)
@@ -9,7 +9,7 @@
 static struct brw_reg alloc_tmp(struct brw_wm_compile *c)
 {
    c->tmp_index++;
-   c->reg_index = MAX2(c->reg_index, c->tmp_index);
+   c->reg_index = MAX2(c->reg_index, c->tmp_start + c->tmp_index);
    return brw_vec8_grf(c->tmp_start + c->tmp_index, 0);
 }