Module: Mesa
Branch: master
Commit: 6422cf387baef75df9e5dbbed5cea4c0f495fe41
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6422cf387baef75df9e5dbbed5cea4c0f495fe41

Author: Kristian Høgsberg <k...@bitplanet.net>
Date:   Mon Mar 22 17:54:35 2010 -0400

intel: Call intel_prepare_render() before looking up regions.

Fixes #27213.

---

 src/mesa/drivers/dri/intel/intel_blit.c        |    2 --
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    2 ++
 src/mesa/drivers/dri/intel/intel_pixel_copy.c  |   11 +++++++----
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_blit.c 
b/src/mesa/drivers/dri/intel/intel_blit.c
index 4617370..167140d 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -119,8 +119,6 @@ intelEmitCopyBlit(struct intel_context *intel,
            break;
    } while (pass < 2);
 
-   intel_prepare_render(intel);
-
    if (pass >= 2)
       return GL_FALSE;
 
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c 
b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index e671355..ef1966e 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -448,6 +448,8 @@ intel_miptree_image_copy(struct intel_context *intel,
        width = ALIGN(width, align_w);
    }
 
+   intel_prepare_render(intel);
+
    for (i = 0; i < depth; i++) {
       intel_miptree_get_image_offset(src, level, face, i, &src_x, &src_y);
       intel_miptree_get_image_offset(dst, level, face, i, &dst_x, &dst_y);
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c 
b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index 8efb7a6..56faf07 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -108,8 +108,8 @@ do_blit_copypixels(GLcontext * ctx,
                    GLint dstx, GLint dsty, GLenum type)
 {
    struct intel_context *intel = intel_context(ctx);
-   struct intel_region *dst = intel_drawbuf_region(intel);
-   struct intel_region *src = copypix_src_region(intel, type);
+   struct intel_region *dst;
+   struct intel_region *src;
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    struct gl_framebuffer *read_fb = ctx->ReadBuffer;
    GLint orig_dstx;
@@ -134,13 +134,16 @@ do_blit_copypixels(GLcontext * ctx,
        ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F)
       return GL_FALSE;
 
+   intel_prepare_render(intel);
+
+   dst = intel_drawbuf_region(intel);
+   src = copypix_src_region(intel, type);
+
    if (!src || !dst)
       return GL_FALSE;
 
    intelFlush(&intel->ctx);
 
-   intel_prepare_render(intel);
-
    /* Clip to destination buffer. */
    orig_dstx = dstx;
    orig_dsty = dsty;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to