anv: Add a layout_to_aux_state helper
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 6 Jan 2020 17:23:43 +0000 (11:23 -0600)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Jan 2020 17:42:36 +0000 (17:42 +0000)
commit9a1232a745cba8f6782ae3833aa2cbdba710fd80
treecce6b288a20f25252d83033c45175efa7f1e3821
parent769d6ba2009a366e0e49f399497a59876dd89286
anv: Add a layout_to_aux_state helper

This new helper maps VkImageLayout enums to isl_aux_state enums which
are the hardware's concept of image layouts.  We can then use the aux
state to get the fast clear type and the aux usage.  This should yield
no functional change in driver behavior.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2605>
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h