diff options
author | Eric Anholt <eric@anholt.net> | 2009-10-23 14:19:52 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-10-23 15:21:05 -0700 |
commit | 49d402e275cdaf46de8db5a475dfe00509141195 (patch) | |
tree | e5d17e8b69c1c0c8e96b43b70d8fcb09d077c942 /src/mesa/drivers/dri/intel/intel_tex_copy.c | |
parent | bfd51dc34d45ba584683c70b1f854a513d9104d3 (diff) | |
parent | 2d17dbfb5346b6d75e87c839148cbe125bf5cd6d (diff) |
Merge remote branch 'origin/mesa_7_6_branch'
Conflicts:
src/mesa/drivers/dri/intel/intel_fbo.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h
src/mesa/drivers/dri/intel/intel_tex_copy.c
src/mesa/drivers/dri/intel/intel_tex_image.c
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_copy.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_copy.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index 99cd818417..c7c48e3d97 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_copy.c +++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c @@ -115,20 +115,22 @@ do_copy_texsubimage(struct intel_context *intel, drm_intel_bo *dst_bo = intel_region_buffer(intel, intelImage->mt->region, INTEL_WRITE_PART); - GLuint image_offset = intel_miptree_image_offset(intelImage->mt, - intelImage->face, - intelImage->level, 0); const GLint orig_x = x; const GLint orig_y = y; + GLuint image_x, image_y; GLshort src_pitch; + intel_miptree_get_image_offset(intelImage->mt, + intelImage->level, + intelImage->face, + 0, + &image_x, &image_y); /* Update dst for clipped src. Need to also clip the source rect. */ dstx += x - orig_x; dsty += y - orig_y; /* Can't blit to tiled buffers with non-tile-aligned offset. */ - if (intelImage->mt->region->tiling != I915_TILING_NONE && - (image_offset & 4095) != 0) { + if (intelImage->mt->region->tiling == I915_TILING_Y) { UNLOCK_HARDWARE(intel); return GL_FALSE; } @@ -160,9 +162,10 @@ do_copy_texsubimage(struct intel_context *intel, src->tiling, intelImage->mt->pitch, dst_bo, - image_offset, + 0, intelImage->mt->region->tiling, - x, y, dstx, dsty, width, height, + x, y, image_x + dstx, image_y + dsty, + width, height, GL_COPY)) { UNLOCK_HARDWARE(intel); return GL_FALSE; |