summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_state.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-12-11 20:34:06 -0800
committerEric Anholt <[email protected]>2014-12-11 23:52:25 -0800
commitd78eb5752838979057a8a1210d6951c084904c0f (patch)
treefa853fc6803e6aa2bc76a408d68a9eda19304847 /src/gallium/drivers/vc4/vc4_state.c
parent0ae5e002e090c5e1bd237fa3f23549f9ab105a44 (diff)
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.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_state.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_state.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c
index bbbb73d4cd6..630ac4dc04f 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);
}