summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-10-11 11:04:09 -0700
committerEric Anholt <[email protected]>2009-10-11 11:21:03 -0700
commita82da7fa263c7fb6b902285994136890e6dc3278 (patch)
tree768f046740bf9b4f6f3e54d429c26960a0d15b6f /src/mesa/drivers/dri/i965
parent768481ed40cb7530fdbadbf4d6dc00b74209adf1 (diff)
i965: Fix the bounds emitted in the vertex buffer packets.
It's the address of the last valid byte, not the address of the first invalid byte. This should also fix problems with rendering with the new sanity checks in the kernel.
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 4aa17fa02d7..5c332467498 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -539,12 +539,12 @@ static void brw_emit_vertices(struct brw_context *brw)
if (input->stride) {
OUT_RELOC(input->bo,
I915_GEM_DOMAIN_VERTEX, 0,
- input->offset + input->stride * input->count);
+ 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);
+ input->offset + input->element_size - 1);
}
} else
OUT_BATCH(input->stride ? input->count : 0);