summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-03-22 17:54:35 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-03-22 17:59:04 -0400
commit62d54f0387610ec4f71cc3d0fb2a5d49e370a0ef (patch)
tree96c5f2dce2b219ef8de4c4227eaf050ec489c92b /src/mesa/drivers
parent092ca30366d15debb35939205d82a6ac2408fbb9 (diff)
intel: Call intel_prepare_render() before looking up regions.
Fixes #27213.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c11
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 f2769aa3e8..4ad42a7c28 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) {
drm_intel_gem_bo_map_gtt(dst_buffer);
drm_intel_gem_bo_map_gtt(src_buffer);
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 4f14946ec7..1b340afc6a 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -520,6 +520,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 f4f3fd6d88..757f2f7d4d 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;
@@ -133,13 +133,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);
-
/* XXX: We fail to handle different inversion between read and draw framebuffer. */
/* Clip to destination buffer. */