anv: Add a usage parameter to anv_layout_to_aux_usage
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 19 Nov 2019 23:51:20 +0000 (17:51 -0600)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Jan 2020 17:42:36 +0000 (17:42 +0000)
commitbf3a262a80a7b0ffd7eee15a7301f2c44683cff9
tree4cef42ec023f7957569efb8fa184c62a3253ed88
parentf8a4de6316f2b9b298a63dcb3bc6fa216d0076ad
anv: Add a usage parameter to anv_layout_to_aux_usage

Most places we actually know the usage and can provide it.  There are
two exceptions to this:

 1. We pass 0 into get_blorp_surf_for_anv_image when we use
    ANV_IMAGE_LAYOUT_EXPLICIT_AUX because anv_layout_to_aux_usage is
    never actually called so it doesn't matter.

 2. We pass 0 into anv_layout_to_aux_usage in transition_color_buffer.
    However, the coming commits which will begin using the usage
    parameter only care about depth.

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_blorp.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c