diff options
author | marha <marha@users.sourceforge.net> | 2012-01-13 16:54:57 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-13 16:54:57 +0100 |
commit | 5cfbe97cd797d8f78ece208bb5114704b83d8aab (patch) | |
tree | 5c88c73ee39367742bb5547ef6fb5a3d25d656e0 /mesalib/src/mesa/main/teximage.c | |
parent | 39324211d7a79ef8115fd1e39771a2e400b31993 (diff) | |
download | vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.gz vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.bz2 vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.zip |
libxtrans libXdmcp libxcb mesa xserver git update 13 jan 2012
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 9475e84f5..39732522c 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -1900,7 +1900,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, } /* Check that the source buffer is complete */ - if (ctx->ReadBuffer->Name) { + if (_mesa_is_user_fbo(ctx->ReadBuffer)) { if (ctx->ReadBuffer->_Status == 0) { _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); } @@ -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 */ @@ -1999,7 +2006,7 @@ copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level) { /* Check that the source buffer is complete */ - if (ctx->ReadBuffer->Name) { + if (_mesa_is_user_fbo(ctx->ReadBuffer)) { if (ctx->ReadBuffer->_Status == 0) { _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); } @@ -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) */ @@ -2179,7 +2193,7 @@ check_rtt_cb(GLuint key, void *data, void *userData) const GLuint level = info->level, face = info->face; /* If this is a user-created FBO */ - if (fb->Name) { + if (_mesa_is_user_fbo(fb)) { GLuint i; /* check if any of the FBO's attachments point to 'texObj' */ for (i = 0; i < BUFFER_COUNT; i++) { |