Module: Mesa Branch: staging/20.1 Commit: f6a7bab598b7a3cd13bcfe39435307364afacbfc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6a7bab598b7a3cd13bcfe39435307364afacbfc
Author: Bas Nieuwenhuizen <[email protected]> Date: Thu Jul 30 12:21:01 2020 +0200 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: <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3387 Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252> (cherry picked from commit e362ccb20c8c7f50d5ca3066092db2a24df20f7e) --- .pick_status.json | 2 +- src/amd/vulkan/radv_image.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 97bc6d106d6..c5372b208cd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -391,7 +391,7 @@ "description": "radv: Do not consider layouts fast-clearable on compute queue.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, 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, _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
