From: Laura Ekstrand Date: Tue, 3 Feb 2015 22:47:00 +0000 (-0800) Subject: main: _mesa_blit_framebuffer updates its arbitrary framebuffers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b284f08ab399154ad10e2166440b44cbbdcb2c5;p=mesa.git main: _mesa_blit_framebuffer updates its arbitrary framebuffers. 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 --- 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