r300g: clamp vertex max index according to currently bound buffers
authorMarek Olšák <maraeo@gmail.com>
Sat, 6 Mar 2010 18:35:10 +0000 (19:35 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 6 Mar 2010 20:27:02 +0000 (21:27 +0100)
src/gallium/drivers/r300/r300_render.c

index 6c89102..073664f 100644 (file)
@@ -278,7 +278,7 @@ static void r300_emit_draw_elements(struct r300_context *r300,
     DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n",
         count, minIndex, maxIndex);
 
-    maxIndex = MIN2(maxIndex, ((1 << 24) - 1));
+    maxIndex = MIN2(maxIndex, r300->vertex_buffer_max_index);
 
     if (alt_num_verts) {
         BEGIN_CS(16);