diff options
author | Chad Versace <[email protected]> | 2017-02-24 17:15:43 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2017-03-28 09:44:44 -0700 |
commit | 6cbc13d94c40f875926b8fd2129852759f314d14 (patch) | |
tree | bfd2ce248cd8a996969848460288f04831e4237b /src/intel/blorp | |
parent | e9017d58dcd0117c67788f7e2084b09f5d47a279 (diff) |
intel: Fix requests for exact surface row pitch (v2)
All callers of isl_surf_init() that set 'min_row_pitch' wanted to
request an *exact* row pitch, as evidenced by nearby asserts, but isl
lacked API for doing so. Now that isl has an API for that, update the
code to use it.
v2: Assert that isl_surf_init() succeeds because the callers assume
it. [for jekstrand]
Reviewed-by: Nanley Chery <[email protected]> (v1)
Reviewed-by: Anuj Phogat <[email protected]> (v1)
Reviewed-by: Jason Ekstrand <[email protected]> (v2)
Diffstat (limited to 'src/intel/blorp')
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 280b76ab70c..691564c8788 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1375,6 +1375,8 @@ static void surf_convert_to_single_slice(const struct isl_device *isl_dev, struct brw_blorp_surface_info *info) { + bool ok UNUSED; + /* Just bail if we have nothing to do. */ if (info->surf.dim == ISL_SURF_DIM_2D && info->view.base_level == 0 && info->view.base_array_layer == 0 && @@ -1421,13 +1423,13 @@ surf_convert_to_single_slice(const struct isl_device *isl_dev, .levels = 1, .array_len = 1, .samples = info->surf.samples, - .min_pitch = info->surf.row_pitch, + .row_pitch = info->surf.row_pitch, .usage = info->surf.usage, .tiling_flags = 1 << info->surf.tiling, }; - isl_surf_init_s(isl_dev, &info->surf, &init_info); - assert(info->surf.row_pitch == init_info.min_pitch); + ok = isl_surf_init_s(isl_dev, &info->surf, &init_info); + assert(ok); /* The view is also different now. */ info->view.base_level = 0; |