main: _mesa_blit_framebuffer updates its arbitrary framebuffers.
authorLaura Ekstrand <laura@jlekstrand.net>
Tue, 3 Feb 2015 22:47:00 +0000 (14:47 -0800)
committerFredrik Höglund <fredrik@kde.org>
Thu, 14 May 2015 13:48:14 +0000 (15:48 +0200)
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 <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
src/mesa/main/blit.c

index baf3165ff9d5c1e10d955411458dfc5d5be2cea3..db8fee5a414f6a382a85ee4fb20acae106340135 100644 (file)
@@ -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