summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30/nv30_vertprog.c
diff options
context:
space:
mode:
authorRoy Spliet <[email protected]>2012-07-19 01:56:35 +0200
committerChristoph Bumiller <[email protected]>2012-07-20 20:31:40 +0200
commit542bd6941f5a56f7a3aa84b44d92591488b146bf (patch)
treed9f09d08d1681332bd69fe3933c7719261a19b68 /src/gallium/drivers/nv30/nv30_vertprog.c
parent248e6f03313afdfd3c23be269b0da7a1aa31cff2 (diff)
nv30: Support negative offsets in indirect constant access.
Fixes piglit vp-address-01 amongst several others. Signed-off-by: Roy Spliet <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Tested-by: Lucas Stach <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_vertprog.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_vertprog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv30/nv30_vertprog.c b/src/gallium/drivers/nv30/nv30_vertprog.c
index 9b5ba35fe1e..06e1b8cdf35 100644
--- a/src/gallium/drivers/nv30/nv30_vertprog.c
+++ b/src/gallium/drivers/nv30/nv30_vertprog.c
@@ -149,8 +149,8 @@ nv30_vertprog_validate(struct nv30_context *nv30)
inst = vp->insns[reloc->location].data;
target = vp->data->start + reloc->target;
- inst[1] &= ~0x0003fc000;
- inst[1] |= target << 14;
+ inst[1] &= ~0x0007fc000;
+ inst[1] |= (target & 0x1ff) << 14;
reloc++;
}
} else {
@@ -159,7 +159,7 @@ nv30_vertprog_validate(struct nv30_context *nv30)
target = vp->data->start + reloc->target;
inst[1] &= ~0x0001ff000;
- inst[1] |= target << 12;
+ inst[1] |= (target & 0x1ff) << 12;
reloc++;
}
}