[Mesa-dev] [PATCH 12/16] i965: Use offset helper in intel_readpixels_tiled_memcpy()
Topi Pohjolainen
topi.pohjolainen at gmail.com
Mon Jul 17 13:35:03 UTC 2017
providing support for isl based.
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_pixel_read.c | 7 +++++--
1 file 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 871559edf9..8eab0a5c12 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);
--
2.11.0
More information about the mesa-dev
mailing list