swrast: Remove redundant term in logic expression
authorChad Versace <chad@chad-versace.us>
Mon, 10 Oct 2011 22:02:22 +0000 (15:02 -0700)
committerChad Versace <chad@chad-versace.us>
Sat, 15 Oct 2011 22:49:03 +0000 (15:49 -0700)
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@vmware.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_readpix.c

index 55b31df5dd384d2f19dcd406b177c80d991a4741..6535a8f4350833af097301851befa0ec7d83281e 100644 (file)
@@ -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 &&
index 0f1f0ff58f609ccb0ff058e84f6803ec3c8f45b4..d120468c021314530507c02f8496f078c591fecb 100644 (file)
@@ -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 &&