i965: Fix VBO last-valid-offset setup on Ironlake.
authorEric Anholt <eric@anholt.net>
Wed, 11 Nov 2009 22:49:03 +0000 (14:49 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 12 Nov 2009 19:41:39 +0000 (11:41 -0800)
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

index 348c66154f81978f06fbd811255f220e09d4e24e..2b1347b698c42207076c6d3a8fd7bb7a61386ec2 100644 (file)
@@ -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 */