diff options
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++) { |