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 6c891029a56e70f119435cbe6e7d1ee686a429d2..073664fa451030d5b85d741890a12518c9f0522c 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);