diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2011-01-21 16:46:36 +0100 |
---|---|---|
committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2011-01-23 13:03:00 +0100 |
commit | 49f16c96f150b192bfd6828ae4ba03afe3a7b8f3 (patch) | |
tree | f0e61a69a113a77f44b8575909dbae09988dd50b | |
parent | c18aa3c73f11c80a1f92f99d4a697900945903b8 (diff) | |
download | external_mesa3d-49f16c96f150b192bfd6828ae4ba03afe3a7b8f3.zip external_mesa3d-49f16c96f150b192bfd6828ae4ba03afe3a7b8f3.tar.gz external_mesa3d-49f16c96f150b192bfd6828ae4ba03afe3a7b8f3.tar.bz2 |
nvc0: don't apply base vertex to per-instance arrays
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_push.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_push.c b/src/gallium/drivers/nvc0/nvc0_push.c index 74c3451..fcbb7da 100644 --- a/src/gallium/drivers/nvc0/nvc0_push.c +++ b/src/gallium/drivers/nvc0/nvc0_push.c @@ -217,6 +217,7 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info) struct push_context ctx; unsigned i, index_size; unsigned inst = info->instance_count; + boolean apply_bias = info->indexed && info->index_bias; ctx.chan = nvc0->screen->base.channel; ctx.translate = nvc0->vertex->translate; @@ -230,7 +231,8 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info) data = nvc0_resource_map_offset(nvc0, res, vb->buffer_offset, NOUVEAU_BO_RD); - if (info->indexed) + + if (apply_bias && likely(!(nvc0->vertex->instance_bufs & (1 << i)))) data += info->index_bias * vb->stride; ctx.translate->set_buffer(ctx.translate, i, data, vb->stride, ~0); |