From 9f986778bd4393c5a9108426969d45aa7f10f334 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 19 Oct 2011 10:44:43 +0200 Subject: libX11 libXext libXft mesa libxcb mkfontscale pixman xserver xkeyboard-config git update 19 oct 2011 --- mesalib/src/mesa/main/teximage.c | 43 +++++----------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) (limited to 'mesalib/src/mesa/main/teximage.c') diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 8efe715fe..2d06f84bf 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -1893,7 +1893,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, const GLenum proxyTarget = get_proxy_target(target); const GLenum type = GL_FLOAT; GLboolean sizeOK; - GLint format; + GLint baseFormat; /* check target */ if (!legal_texsubimage_target(ctx, dimensions, target)) { @@ -1928,14 +1928,14 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, return GL_TRUE; } - format = _mesa_base_tex_format(ctx, internalFormat); - if (format < 0) { + baseFormat = _mesa_base_tex_format(ctx, internalFormat); + if (baseFormat < 0) { _mesa_error(ctx, GL_INVALID_VALUE, "glCopyTexImage%dD(internalFormat)", dimensions); return GL_TRUE; } - if (!_mesa_source_buffer_exists(ctx, format)) { + if (!_mesa_source_buffer_exists(ctx, baseFormat)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexImage%dD(missing readbuffer)", dimensions); return GL_TRUE; @@ -1946,7 +1946,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, ? (width == height) : 1; sizeOK = sizeOK && ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level, - internalFormat, format, + internalFormat, baseFormat, type, width, height, 1, border); @@ -1975,22 +1975,6 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, return GL_TRUE; } } - else if (_mesa_is_depth_format(internalFormat)) { - /* make sure we have depth/stencil buffers */ - if (!ctx->ReadBuffer->_DepthBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(no depth)", dimensions); - return GL_TRUE; - } - } - else if (_mesa_is_depthstencil_format(internalFormat)) { - /* make sure we have depth/stencil buffers */ - if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(no depth/stencil buffer)", dimensions); - return GL_TRUE; - } - } /* if we get here, the parameters are OK */ return GL_FALSE; @@ -2149,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. */ -- cgit v1.2.3