diff options
author | Jason Ekstrand <[email protected]> | 2017-05-30 09:42:25 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-06-01 15:33:58 -0700 |
commit | d065a9540cb4c4f064f695194e35c8c1c3d2b419 (patch) | |
tree | 248dee0844031b54d8e057cef44530cbbe59eb1b /src/intel/blorp | |
parent | b178762d051bad0f373631908b8ce7b5e9ba8d05 (diff) |
intel/isl: Add a helper for getting the byte/tile offset of a subimage
Frequently, get_image_offset_sa is combined with get_intratile_offset_sa
so it makes sense to have a single helper to do both. If the caller
doesn't want the intratile offsets, it can simply pass NULL and ISL will
assert that they are 0.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/blorp')
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 2f7761bff74..d93cde2fcf4 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1401,16 +1401,11 @@ blorp_surf_convert_to_single_slice(const struct isl_device *isl_dev, 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, - layer, z, &x_offset_sa, &y_offset_sa); - uint32_t byte_offset; - isl_tiling_get_intratile_offset_sa(info->surf.tiling, - info->surf.format, info->surf.row_pitch, - x_offset_sa, y_offset_sa, - &byte_offset, - &info->tile_x_sa, &info->tile_y_sa); + isl_surf_get_image_offset_B_tile_sa(&info->surf, + info->view.base_level, layer, z, + &byte_offset, + &info->tile_x_sa, &info->tile_y_sa); info->addr.offset += byte_offset; const uint32_t slice_width_px = |