summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-28 09:14:02 +0300
committerTopi Pohjolainen <[email protected]>2017-07-18 21:36:13 +0300
commit5ff1d76caa418ecbb61e428df75edecd7d19fbdc (patch)
treed1c0e938bfe5a4568ce7b0e01e5ed163eb1ef2da
parentb8d63f50ee7d16d651d4e9a260489dde8ba04401 (diff)
i965: Use offset helper in intel_readpixels_tiled_memcpy()
providing support for isl based. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_read.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index 871559edf9e..8eab0a5c12e 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -162,8 +162,11 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
return false;
}
- xoffset += irb->mt->level[irb->mt_level].slice[irb->mt_layer].x_offset;
- yoffset += irb->mt->level[irb->mt_level].slice[irb->mt_layer].y_offset;
+ unsigned slice_offset_x, slice_offset_y;
+ intel_miptree_get_image_offset(irb->mt, irb->mt_level, irb->mt_layer,
+ &slice_offset_x, &slice_offset_y);
+ xoffset += slice_offset_x;
+ yoffset += slice_offset_y;
dst_pitch = _mesa_image_row_stride(pack, width, format, type);