anv: Canonicalize buffer formats for image/buffer copies
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 17 Jan 2020 23:46:31 +0000 (17:46 -0600)
committerMarge Bot <eric+marge@anholt.net>
Mon, 20 Jan 2020 16:08:17 +0000 (16:08 +0000)
commitdd92179a72e5263b9db730d92a883e2536aa4474
tree806d83b041d4393c3d46931052d664467b31273a
parent14c6e665f7725e9cf314a4bd06de908a943bd43a
anv: Canonicalize buffer formats for image/buffer copies

Some formats, in particular YCbCr formats and ASTC have additional
restrictions.  We already whack ASTC formats to RGBA32_UINT because the
hardware doesn't allow LINEAR with ASTC.  However, we need to fix YCbCr
formats as well because they come with alignment restrictions that we
can't guarantee are satisfied.  We're using blorp_copy to do the copies
so we may as well just stomp formats for everything.

Fixes: b24b93d5843 "anv: enable VK_KHR_sampler_ycbcr_conversion"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
src/intel/vulkan/anv_blorp.c