i965: Store the byte address in the VS constant buffer as an integer.
authorEric Anholt <eric@anholt.net>
Tue, 7 Sep 2010 19:53:19 +0000 (12:53 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 7 Sep 2010 20:00:22 +0000 (13:00 -0700)
We carefully multiplied our two ints (since we want to be precise
after all) then stored them in a float, which is not specced to really
work, in addition to wasting precision.  Fixes
vp-arl-constant-array-huge-* things since the assertions were added.

src/mesa/drivers/dri/i965/brw_vs_emit.c

index 49ef9742a25ee1782f1b4440c54d9527d0c400e0..ad0d00b87c424dc1254b661f8bf0d3bdf0118604 100644 (file)
@@ -954,7 +954,7 @@ get_reladdr_constant(struct brw_vs_compile *c,
    struct brw_compile *p = &c->func;
    struct brw_reg const_reg = c->current_const[argIndex].reg;
    struct brw_reg addrReg = c->regs[PROGRAM_ADDRESS][0];
-   struct brw_reg byte_addr_reg = get_tmp(c);
+   struct brw_reg byte_addr_reg = retype(get_tmp(c), BRW_REGISTER_TYPE_D);
 
    assert(argIndex < 3);