Mesa (master): i965: Fix VBO last-valid-offset setup on Ironlake.
Eric Anholt
anholt at kemper.freedesktop.org
Fri Nov 13 16:04:59 PST 2009
Module: Mesa
Branch: master
Commit: 5f305b1db925c819ddeb29a75f6fbad6500a2d11
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f305b1db925c819ddeb29a75f6fbad6500a2d11
Author: Eric Anholt <eric at anholt.net>
Date: Wed Nov 11 14:49:03 2009 -0800
i965: Fix VBO last-valid-offset setup on Ironlake.
Instead of doing math based on the (broken for VBO && offset != 0)
input->count number, just use the BO size. Fixes assertion failure in ETQW.
---
src/mesa/drivers/dri/i965/brw_draw_upload.c | 13 +++----------
1 files changed, 3 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 348c661..2b1347b 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -536,16 +536,9 @@ static void brw_emit_vertices(struct brw_context *brw)
I915_GEM_DOMAIN_VERTEX, 0,
input->offset);
if (BRW_IS_IGDNG(brw)) {
- if (input->stride) {
- OUT_RELOC(input->bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- input->offset + input->stride * input->count - 1);
- } else {
- assert(input->count == 1);
- OUT_RELOC(input->bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- input->offset + input->element_size - 1);
- }
+ OUT_RELOC(input->bo,
+ I915_GEM_DOMAIN_VERTEX, 0,
+ input->bo->size - 1);
} else
OUT_BATCH(input->stride ? input->count : 0);
OUT_BATCH(0); /* Instance data step rate */
More information about the mesa-commit
mailing list