aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 987d687b9..6ee062d0b 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -1758,11 +1758,8 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
if (bindDrawBuf) {
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
- /* check if old read/draw buffers were render-to-texture */
- if (!bindReadBuf)
- check_end_texture_render(ctx, oldReadFb);
-
- if (oldDrawFb != oldReadFb)
+ /* check if old framebuffer had any texture attachments */
+ if (oldDrawFb)
check_end_texture_render(ctx, oldDrawFb);
/* check if newly bound framebuffer has any texture attachments */
@@ -2026,7 +2023,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
BUFFER_STENCIL);
} else if (attachment == GL_STENCIL_ATTACHMENT &&
texObj == fb->Attachment[BUFFER_DEPTH].Texture) {
- /* As above, but with depth and stencil juxtasposed. */
+ /* As above, but with depth and stencil juxtaposed. */
reuse_framebuffer_texture_attachment(fb, BUFFER_STENCIL,
BUFFER_DEPTH);
} else {
@@ -2269,7 +2266,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
ASSERT_OUTSIDE_BEGIN_END(ctx);
- /* The error differs in GL andd GLES. */
+ /* The error differs in GL and GLES. */
err = ctx->API == API_OPENGL ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
buffer = get_framebuffer_target(ctx, target);