nvc0: clear the flushed flag
authorChristoph Bumiller <christoph.bumiller@speed.at>
Tue, 18 Jun 2013 08:59:45 +0000 (10:59 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 1 Sep 2013 18:52:27 +0000 (20:52 +0200)
src/gallium/drivers/nvc0/nvc0_state_validate.c

index 1e14723244c9d4947654ee24ae38b0b8d78fd321..4b50b43cf76c06ad1125f64935dff00d95a8ae03 100644 (file)
@@ -566,11 +566,10 @@ nvc0_state_validate(struct nvc0_context *nvc0, uint32_t mask, unsigned words)
 
    nouveau_pushbuf_bufctx(nvc0->base.pushbuf, nvc0->bufctx_3d);
    ret = nouveau_pushbuf_validate(nvc0->base.pushbuf);
-   if (unlikely(ret))
-      return FALSE;
 
-   if (unlikely(nvc0->state.flushed))
+   if (unlikely(nvc0->state.flushed)) {
+      nvc0->state.flushed = FALSE;
       nvc0_bufctx_fence(nvc0, nvc0->bufctx_3d, TRUE);
-
-   return TRUE;
+   }
+   return !ret;
 }