summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-01-11 14:02:41 -0800
committerEric Anholt <eric@anholt.net>2012-01-13 10:23:35 -0800
commitbaaa30ad52ac6eba0ee444c33678ffd357883a4d (patch)
tree7d7dec86f8796fd8d8361b8ba409839baa0898dd /src/mesa
parentb178514e24ee7f2f89448b384683fe42fd448c18 (diff)
mesa: Throw the required error for glCopyTex{Sub,}Image from multisample FBO.
Fixes piglit EXT_framebuffer_multisample/negative-copyteximage. Reviewed-by: Brian Paul <brianp@vmware.com> NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 6950a4faf650fe119ee97aa18b006eed099038be)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/teximage.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 9475e84f52d..d5e462b0491 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1909,6 +1909,13 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
return GL_TRUE;
}
+
+ if (ctx->ReadBuffer->Visual.samples > 0) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ "glCopyTexImage%dD(multisample FBO)",
+ dimensions);
+ return GL_TRUE;
+ }
}
/* Check border */
@@ -2008,6 +2015,13 @@ copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
return GL_TRUE;
}
+
+ if (ctx->ReadBuffer->Visual.samples > 0) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ "glCopyTexSubImage%dD(multisample FBO)",
+ dimensions);
+ return GL_TRUE;
+ }
}
/* check target (proxies not allowed) */