iris: move existing image format fallback as a helper function
authorTapani Pälli <tapani.palli@intel.com>
Thu, 12 Mar 2020 06:16:28 +0000 (08:16 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Mar 2020 10:34:21 +0000 (10:34 +0000)
commitd4c879e69e2e54d3f422367a51dc4a4a82dddf22
treec1c4c07ea56f0a61b58a487854a9503c02e4f6df
parentfe2baf72e7b8068cc0abce3f0bb9bd81565c8cf8
iris: move existing image format fallback as a helper function

Patch adds a helper function for determining image format and changes
iris_set_shader_images to use it.

v2: pass iris_context instead of pipe one, rename function,
    code cleanup (Nanley)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4080>
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_resource.h
src/gallium/drivers/iris/iris_state.c