Mesa (master): st/mesa: fix bug in depthstencil optimizing clear logic

Roland Scheidegger sroland at kemper.freedesktop.org
Sat Jun 5 14:55:28 UTC 2010


Module: Mesa
Branch: master
Commit: c00065e5c2ba8a1bcaa543b079abc883af0844f3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c00065e5c2ba8a1bcaa543b079abc883af0844f3

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Sat Jun  5 16:44:31 2010 +0200

st/mesa: fix bug in depthstencil optimizing clear logic

---

 src/mesa/state_tracker/st_cb_clear.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index a819d30..b157925 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -540,7 +540,8 @@ st_Clear(GLcontext *ctx, GLbitfield mask)
        * required from the visual. Hence fix this up to avoid potential
        * read-modify-write in the driver.
        */
-      if (((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) &&
+      if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) &&
+          ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) &&
           (depthRb == stencilRb) &&
           (ctx->DrawBuffer->Visual.depthBits == 0 ||
            ctx->DrawBuffer->Visual.stencilBits == 0))




More information about the mesa-commit mailing list