aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
commit1e90ede4237374dfbb2c8c506a906233bcfd3c5d (patch)
tree13b59b0ab2715fd0bb9eea788c73b08f3b07c01e /mesalib/src/mesa/main/teximage.c
parentbaf98f9bb36f956245d83ecd04f90625d6d68d2b (diff)
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.gz
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.bz2
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/include/os.h
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.
*/