diff options
author | Nanley Chery <[email protected]> | 2018-05-30 16:22:13 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2018-07-12 19:16:30 -0700 |
commit | 0ab2541943478ae39112760198a1fbf71fd48986 (patch) | |
tree | a968187d483997f9fa7440f04420b233454514fa /src/mesa/drivers/dri/i965/intel_mipmap_tree.h | |
parent | 1f6ce1973a0d14951b6b4503fbefa78bc80209f3 (diff) |
i965: Make blt_pitch public
We'd like to reuse this helper.
Cc: <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index ef8f51840cc..49baa6c7515 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -716,6 +716,16 @@ intel_miptree_get_clear_color(const struct gen_device_info *devinfo, struct brw_bo **clear_color_bo, uint32_t *clear_color_offset); + +static inline int +intel_miptree_blt_pitch(struct intel_mipmap_tree *mt) +{ + int pitch = mt->surf.row_pitch; + if (mt->surf.tiling != ISL_TILING_LINEAR) + pitch /= 4; + return pitch; +} + #ifdef __cplusplus } #endif |