Browse Source

i965: Reinstate max-index paranoia

Don't trust the applications not to reference beyond the end of the
vertex buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
undefined
Chris Wilson 14 years ago
parent
commit
b4cbd2b312
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/mesa/drivers/dri/i965/brw_draw_upload.c

+ 1
- 1
src/mesa/drivers/dri/i965/brw_draw_upload.c View File

@@ -550,7 +550,7 @@ static void brw_emit_vertices(struct brw_context *brw)
if (intel->gen >= 5) {
OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->bo->size - 1);
} else
OUT_BATCH(0);
OUT_BATCH(buffer->bo->size / buffer->stride);
OUT_BATCH(0); /* Instance data step rate */

brw->vb.current_buffers[i].handle = buffer->bo->handle;

Loading…
Cancel
Save