anv: Refactor creation of aux surfaces (v2)
authorChad Versace <chad@kiwitree.net>
Wed, 12 Feb 2020 19:50:52 +0000 (11:50 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 6 Mar 2020 23:40:41 +0000 (23:40 +0000)
commit615c65ba1ba6a79536cbced85c13dafbd8a33375
tree7d88309f5300eed7009d7e368078ea9553eda3f3
parentd1b7d80bc358749a4234587e1fda66596f4dd579
anv: Refactor creation of aux surfaces (v2)

make_surface() contained a giant if-tree for creation of aux surfaces.
Move the if-tree into its own function, add_aux_surface_if_supported().
This will simplify future changes for VK_EXT_image_drm_format_modifier.

This patch merely moves the code verbatim, then extracts duplicate
assertions to the top.

v2: Rename func to add_aux_surface_if_supported [for jekstrand].

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4096>
src/intel/vulkan/anv_image.c