i965: Factor out isl_surf_dim/isl_dim_layout calculation into functions.

The logic to calculate the right layout and dimensionality for a given
GL texture target is going to be useful elsewhere, factor it out from
intel_miptree_get_isl_surf().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2 files changed