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 <eric@anholt.net>
This commit is contained in:
Brian Paul
2011-10-13 07:37:43 -06:00
parent 63aa53bf34
commit 241b3e4bbe
-17
View File
@@ -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.
*/