summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_draw_upload.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-10-12 14:39:12 -0700
committerEric Anholt <eric@anholt.net>2010-10-12 15:17:35 -0700
commit43873b53c4d15f10f0321c770b1b8bd537cc226d (patch)
treed2c61e9c7c0d6565a2f5393c5f3a17f7c70da856 /src/mesa/drivers/dri/i965/brw_draw_upload.c
parent3316a542050182d159ed5e5e07aa62839f293b69 (diff)
i965: Don't rebase the index buffer to min 0 if any arrays are in VBOs.
There was a check to only do the rebase if we didn't have everything in VBOs, but nexuiz apparently hands us a mix of VBOs and arrays, resulting in blocking on the GPU to do a rebase. Improves nexuiz 800x600, high-settings performance on my Ironlake 41% (+/- 1.3%), from 14.0fps to 19.7fps.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw_upload.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 249e874ab1..f24c4146ad 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -383,7 +383,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
*/
assert(input->offset < input->bo->size);
} else {
- input->count = input->glarray->StrideB ? max_index + 1 - min_index : 1;
+ input->count = input->glarray->StrideB ? max_index + 1 : 1;
if (input->bo != NULL) {
/* Already-uploaded vertex data is present from a previous
* prepare_vertices, but we had to re-validate state due to
@@ -414,15 +414,6 @@ static void brw_prepare_vertices(struct brw_context *brw)
}
upload[nr_uploads++] = input;
-
- /* We rebase drawing to start at element zero only when
- * varyings are not in vbos, which means we can end up
- * uploading non-varying arrays (stride != 0) when min_index
- * is zero. This doesn't matter as the amount to upload is
- * the same for these arrays whether the draw call is rebased
- * or not - we just have to upload the one element.
- */
- assert(min_index == 0 || input->glarray->StrideB == 0);
}
}