aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_tex_copy.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-06-22 11:20:18 -0700
committerEric Anholt <[email protected]>2009-06-23 19:31:11 -0700
commit246d59c29e3e5a57dcf2f60ad429eb1606193ef0 (patch)
tree0b8aed47be86f6e68a37111257b094c900f39939 /src/mesa/drivers/dri/intel/intel_tex_copy.c
parent6a49473ab5797b1e6ce021e396902f9cb77674ef (diff)
intel: Fix some potential writes to zero-copy PBOs when used as regions.
I was in the midst of fixing some blitting-with-Y-tiled issues when I noticed this. Hopefully PBO usage will be a little more robust, as a result.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_copy.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 260235b1eb1..e1820e3fcf5 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -107,6 +107,9 @@ do_copy_texsubimage(struct intel_context *intel,
intelFlush(ctx);
LOCK_HARDWARE(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);
@@ -151,7 +154,7 @@ do_copy_texsubimage(struct intel_context *intel,
0,
src->tiling,
intelImage->mt->pitch,
- intelImage->mt->region->buffer,
+ dst_bo,
image_offset,
intelImage->mt->region->tiling,
x, y, dstx, dsty, width, height,