radv: Do not consider layouts fast-clearable on compute queue.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 30 Jul 2020 10:21:01 +0000 (12:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 Aug 2020 16:24:38 +0000 (16:24 +0000)
commite362ccb20c8c7f50d5ca3066092db2a24df20f7e
tree2b03c3783e9c58cfcca155e309c68df9d4d5919b
parent2fa83dc64d7930a169cfabf0ec67c36b43dc0cab
radv: Do not consider layouts fast-clearable on compute queue.

We cannot decompress from the compute queue. While I'm pretty sure
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL is only useful on the
graphics queue, I cannot find a VU that prevents the transition
from happening on another queue, so we need to be careful here.

This patch ensures we do the decompression on the barrier that changes
the queue ownership.

Another problem was that DCC images were considered fast-clearable
when not DCC compressed, which resulted in a mess with concurrent
queue ownership.

Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3387
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252>
src/amd/vulkan/radv_image.c