radeon/r200: flush vertices when data in cmdbuf.
authorDave Airlie <airlied@redhat.com>
Tue, 10 Feb 2009 19:07:31 +0000 (05:07 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 10 Feb 2009 19:07:31 +0000 (05:07 +1000)
This fixes a whole bunch of regressions in piglit

src/mesa/drivers/dri/r200/r200_ioctl.h
src/mesa/drivers/dri/radeon/radeon_ioctl.h

index 6b9e4be30a099c846bf28d7da4b04b7effe4e681..316acef4593208d7f320566cc55050df33a0d54b 100644 (file)
@@ -39,6 +39,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "radeon_dri.h"
 #include "r200_lock.h"
 
+#include "radeon_cs_legacy.h"
+
 #include "xf86drm.h"
 #include "drm.h"
 #include "radeon_drm.h"
@@ -129,7 +131,7 @@ static INLINE int R200_DB_STATECHANGE(
  */
 #define R200_FIREVERTICES( rmesa )                     \
 do {                                                   \
-   if ( rmesa->radeon.dma.flush ) {    \
+   if ( rmesa->radeon.cmdbuf.cs->cdw || rmesa->radeon.dma.flush ) {    \
       r200Flush( rmesa->radeon.glCtx );                        \
    }                                                   \
 } while (0)
index ac763703bcfccf0cdb715253390743d552f6d428..4e93804646a4f3ec947aa65a7599896c6e830c20 100644 (file)
@@ -38,7 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "main/simple_list.h"
 #include "radeon_lock.h"
-
+#include "radeon_cs_legacy.h"
 
 extern void radeonEmitState( r100ContextPtr rmesa );
 extern void radeonEmitVertexAOS( r100ContextPtr rmesa,
@@ -132,9 +132,9 @@ static INLINE int RADEON_DB_STATECHANGE(r100ContextPtr rmesa,
  */
 #define RADEON_FIREVERTICES( rmesa )                   \
 do {                                                   \
-   if ( rmesa->radeon.dma.flush ) {    \
+   if (rmesa->radeon.cmdbuf.cs->cdw || rmesa->radeon.dma.flush ) {     \
       radeonFlush( rmesa->radeon.glCtx );                      \
-   }                                                   \
+                                                     \
 } while (0)
 
 /* Command lengths.  Note that any time you ensure ELTS_BUFSZ or VBUF_BUFSZ