aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_pixel_copy.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-03-22 17:54:35 -0400
committerKristian Høgsberg <[email protected]>2010-03-22 17:55:05 -0400
commit6422cf387baef75df9e5dbbed5cea4c0f495fe41 (patch)
tree9aa68c60dc894d4cbfedc965752f66969c89d968 /src/mesa/drivers/dri/intel/intel_pixel_copy.c
parent262961ef694d90fd008041c8384014fd7ed45594 (diff)
intel: Call intel_prepare_render() before looking up regions.
Fixes #27213.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_pixel_copy.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index 8efb7a60c26..56faf076c7e 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;