Mesa (master): vc4: Don' t throw out the index offset in the shadow index buffer path.
Eric Anholt
anholt at kemper.freedesktop.org
Fri Dec 12 07:53:10 UTC 2014
Module: Mesa
Branch: master
Commit: d78eb5752838979057a8a1210d6951c084904c0f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d78eb5752838979057a8a1210d6951c084904c0f
Author: Eric Anholt <eric at anholt.net>
Date: Thu Dec 11 20:34:06 2014 -0800
vc4: Don't throw out the index offset in the shadow index buffer path.
When we upload shadow indices at draw time, we need the source offset.
Fixes the piglit draw-elements test.
---
src/gallium/drivers/vc4/vc4_state.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c
index bbbb73d..630ac4d 100644
--- a/src/gallium/drivers/vc4/vc4_state.c
+++ b/src/gallium/drivers/vc4/vc4_state.c
@@ -300,12 +300,11 @@ vc4_set_index_buffer(struct pipe_context *pctx,
pipe_resource_reference(&vc4->indexbuf.buffer, NULL);
vc4->indexbuf.buffer = pshadow;
vc4->indexbuf.index_size = 2;
- vc4->indexbuf.offset = 0;
} else {
pipe_resource_reference(&vc4->indexbuf.buffer, ib->buffer);
vc4->indexbuf.index_size = ib->index_size;
- vc4->indexbuf.offset = ib->offset;
}
+ vc4->indexbuf.offset = ib->offset;
} else {
pipe_resource_reference(&vc4->indexbuf.buffer, NULL);
}
More information about the mesa-commit
mailing list