From: Brian Paul Date: Thu, 13 Oct 2011 13:37:43 +0000 (-0600) Subject: mesa: remove redundant buffer checks in copytexsubimage_error_check2() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=241b3e4bbe93ecab545b4454f656c9ffd073ae85;p=mesa.git mesa: remove redundant buffer checks in copytexsubimage_error_check2() Again, there was already a call to _mesa_source_buffer_exists() earlier in the function. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 28c970588d2..84eed2354ac 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2133,23 +2133,6 @@ copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions, return GL_TRUE; } - if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) { - if (!ctx->ReadBuffer->_DepthBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(no depth buffer)", - dimensions); - return GL_TRUE; - } - } - else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) { - if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(no depth/stencil buffer)", - dimensions); - return GL_TRUE; - } - } - /* If copying into an integer texture, the source buffer must also be * integer-valued. */