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/isl/isl.h | |
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/isl/isl.h')
-rw-r--r-- | src/intel/isl/isl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index 8b2d264f8b2..658f67e4ae3 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -1590,6 +1590,27 @@ isl_surf_get_image_offset_el(const struct isl_surf *surf, uint32_t *y_offset_el); /** + * Calculate the offset, in bytes and intratile surface samples, to a + * subimage in the surface. + * + * This is equivalent to calling isl_surf_get_image_offset_el, passing the + * result to isl_tiling_get_intratile_offset_el, and converting the tile + * offsets to samples. + * + * @invariant level < surface levels + * @invariant logical_array_layer < logical array length of surface + * @invariant logical_z_offset_px < logical depth of surface at level + */ +void +isl_surf_get_image_offset_B_tile_sa(const struct isl_surf *surf, + uint32_t level, + uint32_t logical_array_layer, + uint32_t logical_z_offset_px, + uint32_t *offset_B, + uint32_t *x_offset_sa, + uint32_t *y_offset_sa); + +/** * @brief Calculate the intratile offsets to a surface. * * In @a base_address_offset return the offset from the base of the surface to |