intel/blorp: Use the surface format for computing offsets
authorJason Ekstrand <jason.ekstrand@intel.com>
Sun, 28 Aug 2016 05:44:15 +0000 (22:44 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Sep 2016 02:42:57 +0000 (19:42 -0700)
If we use the view format, it may be an uncompressed view of a compressed
image which throws things off.  Since we're computing offsets of images, we
want the actual surface offset anyway.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/blorp/blorp_blit.c

index c6285d4193d6a874f4a8e60a37f18006bacc71cd..9108e5db4ddd5a76a49a6e610903605da83d584c 100644 (file)
@@ -1264,7 +1264,7 @@ surf_convert_to_single_slice(const struct isl_device *isl_dev,
 
    uint32_t byte_offset;
    isl_tiling_get_intratile_offset_sa(isl_dev, info->surf.tiling,
-                                      info->view.format, info->surf.row_pitch,
+                                      info->surf.format, info->surf.row_pitch,
                                       x_offset_sa, y_offset_sa,
                                       &byte_offset,
                                       &info->tile_x_sa, &info->tile_y_sa);