r600: don't draw when num indices is 0
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 27 Jul 2009 06:25:24 +0000 (02:25 -0400)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 27 Jul 2009 06:26:41 +0000 (02:26 -0400)
fixes engine demo

src/mesa/drivers/dri/r600/r700_render.c

index 0a5e04154792b7b90b55dae98454185baad1c3f8..5a2bf84b59ec92e36507f5d072004659f8d197eb 100644 (file)
@@ -342,6 +342,9 @@ static GLboolean r700RunRender(GLcontext * ctx,
         unsigned int VGT_PRIMITIVE_TYPE = 0;
         unsigned int VGT_NUM_INDICES    = 0;
 
+       if (numIndices < 1)
+               continue;
+
         numEntires =   3 /* VGT_PRIMITIVE_TYPE */
                     + 2 /* VGT_INDEX_TYPE */
                     + 2 /* NUM_INSTANCES */