summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-05-22 12:44:38 +0200
committerChristoph Bumiller <[email protected]>2012-05-22 12:50:12 +0200
commita054fd8268876048a7ce45a2ebfc40a3dd1e8540 (patch)
tree1653633bb7ca953b771c76fcdb0ce2ad95937018 /src/gallium/drivers
parent91fb5e0394f702a795f317c6c78af7e9676e46c3 (diff)
nv50: make unaligned index buffer offsets work again
Messed up in ef7bb281292c17b762b57779306e874704c87328.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index 4cecdea3bfb..1875d4d6092 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -568,7 +568,9 @@ nv50_draw_elements(struct nv50_context *nv50, boolean shorten,
struct nv04_resource *buf = nv04_resource(nv50->idxbuf.buffer);
unsigned pb_start;
unsigned pb_bytes;
- const unsigned base = buf->offset + nv50->idxbuf.offset;
+ const unsigned base = (buf->offset + nv50->idxbuf.offset) & ~3;
+
+ start += ((buf->offset + nv50->idxbuf.offset) & 3) >> (index_size >> 1);
assert(nouveau_resource_mapped_by_gpu(nv50->idxbuf.buffer));