nvfx: don't emit dummy commands on nv30
authorLuca Barbieri <luca@luca-barbieri.com>
Mon, 23 Aug 2010 22:03:28 +0000 (00:03 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Mon, 23 Aug 2010 22:05:27 +0000 (00:05 +0200)
Should fix errors on the original nv30, reported by pmdata.

src/gallium/drivers/nvfx/nvfx_push.c

index 49d518e2eb9034c7858879667a6e2723d0ebd2f6..ffe7e983578fb9db68700674ed82e63a92f1d707 100644 (file)
@@ -368,11 +368,15 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
                        if(max_verts >= 16)
                        {
                                /* XXX: any command a lot of times seems to (mostly) fix corruption that would otherwise happen */
-                               int i;
-                               for(i = 0; i < 32; ++i)
+                               /* this seems to cause issues on nv3x, and also be unneeded there */
+                               if(nvfx->is_nv4x)
                                {
-                                       OUT_RING(chan, RING_3D(0x1dac, 1));
-                                       OUT_RING(chan, 0);
+                                       int i;
+                                       for(i = 0; i < 32; ++i)
+                                       {
+                                               OUT_RING(chan, RING_3D(0x1dac, 1));
+                                               OUT_RING(chan, 0);
+                                       }
                                }
 
                                OUT_RING(chan, RING_3D(NV34TCL_VERTEX_BEGIN_END, 1));