iris: Use isl_surf_get_image_surf instead of hand-rolling it
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 3 Jun 2021 22:49:02 +0000 (17:49 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Jun 2021 23:26:04 +0000 (23:26 +0000)
commit2ccdd639c2459cb3738d5ffa0ebcca8cfa0e1532
treef340ae596f99d8fbb98d79e433ebaf999aa44ccd
parent5066839ffdbeac5b8d24f83e7c55cb20545cd48b
iris: Use isl_surf_get_image_surf instead of hand-rolling it

For the 3D RT read case on BDW, we can use the ISL helper.  For the 1D
array case, we don't actually need to flatten; we can just smash it to a
2D array surface because the layout for 1D and 2D is the same on BDW.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11235>
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_resource.h
src/gallium/drivers/iris/iris_state.c