Mesa (master): mesa: Throw the required error for glCopyTex{Sub, }Image from multisample FBO.

Eric Anholt anholt at kemper.freedesktop.org
Thu Jan 12 20:34:34 UTC 2012


Module: Mesa
Branch: master
Commit: 6950a4faf650fe119ee97aa18b006eed099038be
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6950a4faf650fe119ee97aa18b006eed099038be

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 11 14:02:41 2012 -0800

mesa: Throw the required error for glCopyTex{Sub,}Image from multisample FBO.

Fixes piglit EXT_framebuffer_multisample/negative-copyteximage.

Reviewed-by: Brian Paul <brianp at vmware.com>
NOTE: This is a candidate for the 8.0 branch.

---

 src/mesa/main/teximage.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ce62248..3973252 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) */




More information about the mesa-commit mailing list