diff options
author | Marek Olšák <maraeo@gmail.com> | 2013-01-14 08:20:42 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2013-01-15 16:47:18 +0100 |
commit | d489c90a68e125b81bb590a0262ebdba91f0b883 (patch) | |
tree | 95f2ce64378cb71aad9184d63955a169d727062a /src/mesa | |
parent | f94ea25a4ac9f65cfec880ea3cb9d6c50eda93d1 (diff) |
st/mesa: remove dead conditional in Clear
I think the conditional always evaluates to false.
If I understand the code in core Mesa correctly, depthBits or stencilBits
is 0 if the depth or stencil renderbuffer is NULL, respectively.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 02b506c81e0..5cf4c07f126 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -447,20 +447,8 @@ st_Clear(struct gl_context *ctx, GLbitfield mask) quad_buffers & PIPE_CLEAR_DEPTH, quad_buffers & PIPE_CLEAR_STENCIL); } else if (clear_buffers) { - /* driver cannot know it can clear everything if the buffer - * is a combined depth/stencil buffer but this wasn't actually - * required from the visual. Hence fix this up to avoid potential - * read-modify-write in the driver. - */ union pipe_color_union clearColor; - 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)) - clear_buffers |= PIPE_CLEAR_DEPTHSTENCIL; - if (ctx->DrawBuffer->_ColorDrawBuffers[0]) { struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; GLboolean is_integer = _mesa_is_enum_format_integer(rb->InternalFormat); |