r600g: fix vbo size
authorJerome Glisse <jglisse@redhat.com>
Fri, 27 Aug 2010 20:52:29 +0000 (16:52 -0400)
committerJerome Glisse <jglisse@redhat.com>
Fri, 27 Aug 2010 20:54:00 +0000 (16:54 -0400)
Silence the kernel, vbo size is size - 1.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/r600_draw.c

index 1eb868c4c77593d00010cf72fab5ba60ee10a9c8..1c426f755dac66f3fbd68b9a5845d3f4931c3215 100644 (file)
@@ -107,7 +107,7 @@ static int r600_draw_common(struct r600_draw *draw)
                vs_resource->bo[0] = radeon_bo_incref(rscreen->rw, rbuffer->bo);
                vs_resource->nbo = 1;
                vs_resource->states[R600_PS_RESOURCE__RESOURCE0_WORD0] = offset;
-               vs_resource->states[R600_PS_RESOURCE__RESOURCE0_WORD1] = rbuffer->bo->size - offset;
+               vs_resource->states[R600_PS_RESOURCE__RESOURCE0_WORD1] = rbuffer->bo->size - offset - 1;
                vs_resource->states[R600_PS_RESOURCE__RESOURCE0_WORD2] = S_038008_STRIDE(vertex_buffer->stride) |
                                                                S_038008_DATA_FORMAT(format);
                vs_resource->states[R600_PS_RESOURCE__RESOURCE0_WORD3] = 0x00000000;