Mesa: fix the case where there are no vertex attributes.
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>
Tue, 7 Oct 2008 19:28:38 +0000 (21:28 +0200)
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>
Tue, 7 Oct 2008 19:28:38 +0000 (21:28 +0200)
This is a backport of 8e8208d6db8b764568539784a6473d545dec2265 to gallium-0.1

src/mesa/state_tracker/st_draw.c

index bdf8648ef7ca92694bb0c934d4f6a3d96521841f..61949a93884f4b91e7265ddd21269eb0ebb268c9 100644 (file)
@@ -525,6 +525,8 @@ st_draw_vbo(GLcontext *ctx,
                                 vbuffer, velements);
       num_vbuffers = 1;
       num_velements = vp->num_inputs;
+      if (num_velements == 0)
+         num_vbuffers = 0;
    }
    else {
       /*printf("Draw non-interleaved\n");*/