aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 10:44:43 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 10:44:43 +0200
commit9f986778bd4393c5a9108426969d45aa7f10f334 (patch)
tree27d7bd08dac54a54a923e76dccf2b8e388be2a03 /mesalib/src/mesa/main/teximage.c
parentafbd3947071a33f59dda122f1ac396442a02c128 (diff)
downloadvcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.gz
vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.bz2
vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.zip
libX11 libXext libXft mesa libxcb mkfontscale pixman xserver
xkeyboard-config git update 19 oct 2011
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c43
1 files changed, 5 insertions, 38 deletions
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.
*/