diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2020-07-30 12:21:01 +0200 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2020-08-19 22:28:29 +0200 |
commit | f9c5c668de33fe1a87ddbe50af7f847034a5d954 (patch) | |
tree | 691a0eacc15f2bd710163ecea2dda0518147be44 /src | |
parent | da36f4f356399a3fc8c18190fccb78677416802f (diff) |
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>
(cherry picked from commit e362ccb20c8c7f50d5ca3066092db2a24df20f7e)
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index f7818c691c8..a71bf8a8d0a 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -1786,7 +1786,8 @@ bool radv_layout_can_fast_clear(const struct radv_image *image, bool in_render_loop, unsigned queue_mask) { - return layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + return layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL && + queue_mask == (1u << RADV_QUEUE_GENERAL); } bool radv_layout_dcc_compressed(const struct radv_device *device, |