replace _mesa_logbase2 with util_logbase2
[mesa.git] / src / mesa / main / blit.c
index bb866b1e0902c133be583140f709efaaf6da8ecd..8bb3ba328a32c03c530ea9cca5cf197343ff4ea7 100644 (file)
@@ -349,12 +349,6 @@ blit_framebuffer(struct gl_context *ctx,
 {
    FLUSH_VERTICES(ctx, 0);
 
-   /* 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
        * support MakeCurrent() with no drawables.
@@ -362,6 +356,12 @@ blit_framebuffer(struct gl_context *ctx,
       return;
    }
 
+   /* 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 (!no_error) {
       const GLbitfield legalMaskBits = (GL_COLOR_BUFFER_BIT |
                                         GL_DEPTH_BUFFER_BIT |