From 6b284f08ab399154ad10e2166440b44cbbdcb2c5 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Tue, 3 Feb 2015 14:47:00 -0800 Subject: [PATCH] main: _mesa_blit_framebuffer updates its arbitrary framebuffers. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Previously, we used _mesa_update_state to update the currently bound framebuffers prior to performing a blit. Now that _mesa_blit_framebuffer uses arbitrary framebuffers, _mesa_update_state is not specific enough. Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mesa/main/blit.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c index baf3165ff9d..db8fee5a414 100644 --- a/src/mesa/main/blit.c +++ b/src/mesa/main/blit.c @@ -34,6 +34,7 @@ #include "enums.h" #include "blit.h" #include "fbobject.h" +#include "framebuffer.h" #include "glformats.h" #include "mtypes.h" #include "state.h" @@ -162,9 +163,11 @@ _mesa_blit_framebuffer(struct gl_context *ctx, FLUSH_VERTICES(ctx, 0); - if (ctx->NewState) { - _mesa_update_state(ctx); - } + /* Update completeness status of readFb and drawFb. */ + _mesa_update_framebuffer(ctx, readFb, drawFb); + + /* Make sure drawFb has an initialized bounding box. */ + _mesa_update_draw_buffer_bounds(ctx, drawFb); if (!readFb || !drawFb) { /* This will normally never happen but someday we may want to -- 2.30.2