[Mesa-dev] [PATCH 08/33] intel/blorp: Handle 3D surfaces in convert_to_single_slice

Jason Ekstrand jason at jlekstrand.net
Wed Aug 31 21:22:27 UTC 2016


---
 src/intel/blorp/blorp_blit.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index c580be7..b5d8d2a 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -1265,10 +1265,15 @@ surf_convert_to_single_slice(const struct isl_device *isl_dev,
     */
    assert(info->tile_x_sa == 0 && info->tile_y_sa == 0);
 
+   uint32_t layer = 0, z = 0;
+   if (info->surf.dim == ISL_SURF_DIM_3D)
+      z = info->view.base_array_layer;
+   else
+      layer = info->view.base_array_layer;
+
    uint32_t x_offset_sa, y_offset_sa;
    isl_surf_get_image_offset_sa(&info->surf, info->view.base_level,
-                                info->view.base_array_layer, 0,
-                                &x_offset_sa, &y_offset_sa);
+                                layer, z, &x_offset_sa, &y_offset_sa);
 
    uint32_t byte_offset;
    isl_tiling_get_intratile_offset_sa(isl_dev, info->surf.tiling,
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list