summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2007-03-22 14:26:49 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2007-03-22 14:28:18 +0000
commit985a2eff82111e81f70b6dea9d9b3184dd0061d3 (patch)
tree5b3af110ae94d57a5214ffa4c566c72cd7974c8f /src/mesa/main
parent01b7f2ab2e7a9291bf54475e816e88804ee7cd53 (diff)
Ensure we have a valid ReadBuffer for CopyTexSubImage, and
if not bail accordingly. Previously we'd only do this test on compressed textures.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/teximage.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 543d6efc98..706d346695 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2061,12 +2061,6 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
}
if (teximage->IsCompressed) {
- if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexSubImage%dD(missing readbuffer)", dimensions);
- return GL_TRUE;
- }
-
if (target != GL_TEXTURE_2D) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glCopyTexSubImage%d(target)", dimensions);
@@ -2096,6 +2090,12 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
+ if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(missing readbuffer)", dimensions);
+ return GL_TRUE;
+ }
+
if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) {
if (!ctx->ReadBuffer->_DepthBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,