isl: Refactor row pitch calculation (v2)
authorChad Versace <chadversary@chromium.org>
Sat, 25 Feb 2017 00:23:02 +0000 (16:23 -0800)
committerChad Versace <chadversary@chromium.org>
Tue, 21 Mar 2017 22:56:16 +0000 (15:56 -0700)
commit44ac618a4169c3ca35ec70dddac07d3e5346685a
tree62104c4b1235606a70d86e2f01968b36cae33943
parentc2b706f8afed02f15ef6fd067e47d60e1f0987a5
isl: Refactor row pitch calculation (v2)

The calculations of row_pitch, the row pitch's alignment, surface size,
and base_alignment were mixed together. This patch moves the calculation
of row_pitch and its alignment to occur before the calculation of
surface_size and base_alignment.

This simplifies a follow-on patch that adds a new member, 'row_pitch',
to struct isl_surf_init_info.

v2:
  - Also extract the row pitch alignment.
  - More helper functions that will later help validate the row pitch.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v2)
src/intel/isl/isl.c