965: use correct offset for constants vs immediates
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 3 Jan 2008 19:46:16 +0000 (19:46 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Fri, 4 Jan 2008 01:20:41 +0000 (01:20 +0000)
src/mesa/pipe/i965simple/brw_vs_emit.c

index 0cc0a437b0b38d52dcc499fe7f640b2dd78f95b3..5f212bd055387a7a1b1a1c77e6c66fe141671478 100644 (file)
@@ -630,8 +630,8 @@ static struct brw_reg get_reg( struct brw_vs_compile *c,
       assert(c->regs[file][index].nr != 0);
       return c->regs[file][index];
    case TGSI_FILE_CONSTANT:
-      assert(c->regs[TGSI_FILE_CONSTANT][index + c->prog_data.num_consts].nr != 0);
-      return c->regs[TGSI_FILE_CONSTANT][index + c->prog_data.num_consts];
+      assert(c->regs[TGSI_FILE_CONSTANT][index + c->prog_data.num_imm].nr != 0);
+      return c->regs[TGSI_FILE_CONSTANT][index + c->prog_data.num_imm];
    case TGSI_FILE_IMMEDIATE:
       assert(c->regs[TGSI_FILE_CONSTANT][index].nr != 0);
       return c->regs[TGSI_FILE_CONSTANT][index];