r200: Don't flush when closing elts in KMS.
authorPauli Nieminen <suokkos@gmail.com>
Sun, 21 Mar 2010 20:55:13 +0000 (22:55 +0200)
committerPauli Nieminen <suokkos@gmail.com>
Sun, 21 Mar 2010 21:39:53 +0000 (23:39 +0200)
Flush in middle of rendering in KMS is not allowed because
buffers are discarded in flush.

Fixes crash when emiting split indices with RADEON_DEBUG=all.

src/mesa/drivers/dri/r200/r200_cmdbuf.c

index 2f2b8d94dca12b359f94e059e6a72ecaf8ac6c13..382ae0daa4fc2a0228094e388f596676c5a3a2b2 100644 (file)
@@ -189,7 +189,8 @@ void r200FlushElts(GLcontext *ctx)
    if (R200_ELT_BUF_SZ > elt_used)
      radeonReturnDmaRegion(&rmesa->radeon, R200_ELT_BUF_SZ - elt_used);
 
-   if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)) {
+   if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)
+       && !rmesa->radeon.radeonScreen->kernel_mm) {
       radeon_print(RADEON_SYNC, RADEON_NORMAL, "%s: Syncing\n", __FUNCTION__);
       radeonFinish( rmesa->radeon.glCtx );
    }