diff options
author | Nanley Chery <[email protected]> | 2019-05-23 13:44:52 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2019-06-27 23:38:37 +0000 |
commit | fb1350c76f1525e6bd320cef62d55aff19ec3f05 (patch) | |
tree | cf27fcd8a5ba2df254d30278c72c1ecab331e5aa /src/intel/vulkan/anv_image.c | |
parent | 0ba0c0c15c633a5a3b7a4651a743f800f30bcbf6 (diff) |
intel: Add and use helpers for level0 extent
Prepare for a bug fix by adding and using helpers which convert
isl_surf::logical_level0_px and isl_surf::phys_level0_sa to units of
surface elements.
v2:
- Update iris (Ken).
- Update anv.
Cc: <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r-- | src/intel/vulkan/anv_image.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 9170ed313e5..9af7f7b66cc 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -1389,12 +1389,9 @@ anv_image_fill_surface_state(struct anv_device *device, const struct isl_format_layout *fmtl = isl_format_get_layout(surface->isl.format); tmp_surf.format = view.format; - tmp_surf.logical_level0_px.width = - DIV_ROUND_UP(tmp_surf.logical_level0_px.width, fmtl->bw); - tmp_surf.logical_level0_px.height = - DIV_ROUND_UP(tmp_surf.logical_level0_px.height, fmtl->bh); - tmp_surf.phys_level0_sa.width /= fmtl->bw; - tmp_surf.phys_level0_sa.height /= fmtl->bh; + tmp_surf.logical_level0_px = + isl_surf_get_logical_level0_el(&tmp_surf); + tmp_surf.phys_level0_sa = isl_surf_get_phys_level0_el(&tmp_surf); tile_x_sa /= fmtl->bw; tile_y_sa /= fmtl->bh; |