st/mesa: fix bug in depthstencil optimizing clear logic

This commit is contained in:
Roland Scheidegger
2010-06-05 16:44:31 +02:00
parent acb20e7208
commit c00065e5c2
+2 -1
View File
@@ -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))