intel: Refactor selection of miptree tiling
authorChad Versace <chad.versace@linux.intel.com>
Tue, 9 Apr 2013 02:27:36 +0000 (19:27 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Apr 2013 23:15:06 +0000 (16:15 -0700)
commitf709198b10821e6fb4d1facff651e70850946bcb
tree25733cfc94e10f0a77baa7d4193f75cccd2bf81a
parentaa391976dfa12479185d9eeed1f2a0b4dce6c49b
intel: Refactor selection of miptree tiling

This patch (1) extracts from intel_miptree_create() the spaghetti logic
that selects the tiling format, (2) rewrites that spaghetti into a lucid
form, and (3) moves it to a new function, intel_miptree_choose_tiling().
No behavioral change.

As a bonus, it is now evident that the force_y_tiling parameter to
intel_miptree_create() does not really force Y tiling.

v2 (Ken): Rebase on top of Eric's untiled-for-larger-than-aperture
changes.  This required passing in the miptree.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c