[Mesa-dev] [PATCH 23/38] main: _mesa_blit_framebuffer updates its arbitrary framebuffers.

Laura Ekstrand laura at jlekstrand.net
Tue Mar 3 17:32:15 PST 2015


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.
---
 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 e03b5dc..1569004 100644
--- a/src/mesa/main/blit.c
+++ b/src/mesa/main/blit.c
@@ -33,6 +33,7 @@
 #include "enums.h"
 #include "blit.h"
 #include "fbobject.h"
+#include "framebuffer.h"
 #include "glformats.h"
 #include "mtypes.h"
 #include "state.h"
@@ -161,9 +162,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.1.0



More information about the mesa-dev mailing list