OSDN Git Service

intel/isl: Refactor isl_calc_array_pitch_el_rows
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 30 May 2017 05:12:36 +0000 (22:12 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 1 Jun 2017 22:33:37 +0000 (15:33 -0700)
commit58051ad22046253d4ed9644407d5c2ee8a22aa31
tree1171d5f888f6f5e84e1ced5e113af9cf90c55ea4
parentfe13c59c1b0e06b7ce447e165297b646a7aa5763
intel/isl: Refactor isl_calc_array_pitch_el_rows

Over 90% of the function only applies to ISL_DIM_LAYOUT_GEN4_2D anyway
so we can just handle the other two as special cases at the top.  The
two "generic" cases below the switch only apply on gen9 and above and
only to 3D or CCS surfaces.  This implies that they only apply to
surfaces with ISL_DIM_LAYOUT_GEN4_2D.  Making them look generic is a
lie.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/isl/isl.c