Mesa (master): swrast: Remove redundant term in logic expression
Chad Versace
chadversary at kemper.freedesktop.org
Sat Oct 15 22:49:24 UTC 2011
Module: Mesa
Branch: master
Commit: 4bcda856982cc428cba555367001f4db721a9aaf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4bcda856982cc428cba555367001f4db721a9aaf
Author: Chad Versace <chad at chad-versace.us>
Date: Mon Oct 10 15:02:22 2011 -0700
swrast: Remove redundant term in logic expression
Fix is in {read,draw}_depth_stencil_pixels(). If depthRb == stencilRb,
then it is redundant to check depthRb->x *and* stencilRb->x.
Reviewed-by: Brian Paul <brianp at vmware.com>
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
src/mesa/swrast/s_drawpix.c | 1 -
src/mesa/swrast/s_readpix.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 55b31df..6535a8f 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -590,7 +590,6 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
ASSERT(stencilRb);
if (depthRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
- stencilRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
depthRb->Format == MESA_FORMAT_Z24_S8 &&
type == GL_UNSIGNED_INT_24_8 &&
depthRb == stencilRb &&
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 0f1f0ff..d120468 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -391,7 +391,6 @@ read_depth_stencil_pixels(struct gl_context *ctx,
stencilRb = ctx->ReadBuffer->Attachment[BUFFER_STENCIL].Renderbuffer;
if (depthRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
- stencilRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
depthRb->Format == MESA_FORMAT_Z24_S8 &&
type == GL_UNSIGNED_INT_24_8 &&
depthRb == stencilRb &&
More information about the mesa-commit
mailing list