diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-03-17 03:18:29 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-03-18 09:10:55 +0000 |
commit | 8ebc7dcb59a69763cc369af7c723e40a3fd29f7f (patch) | |
tree | 222e432f119129bbafae7214503d02540648e65e /src/amd/vulkan | |
parent | d5974aeeae3d505114a6aa6b51b0c45c17e1baec (diff) |
radv: Allow fast clears with concurrent queue mask for some layouts.
For VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL and
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL we do not care about
the queue mask because
1) using these is only allowed on the gfx queue
2) transitions for these are only allowed on the gfx queue.
This enables some fast clears for Doom that uses
VK_SHARING_MODE_CONCURRENT.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index fc8c6a2ebfe..dba8c1f4502 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -1222,8 +1222,8 @@ bool radv_layout_has_htile(const struct radv_image *image, return radv_image_has_htile(image) && (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL || - layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) && - queue_mask == (1u << RADV_QUEUE_GENERAL); + (layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && + queue_mask == (1u << RADV_QUEUE_GENERAL))); } bool radv_layout_is_htile_compressed(const struct radv_image *image, @@ -1235,16 +1235,15 @@ bool radv_layout_is_htile_compressed(const struct radv_image *image, return radv_image_has_htile(image) && (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL || - layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) && - queue_mask == (1u << RADV_QUEUE_GENERAL); + (layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && + queue_mask == (1u << RADV_QUEUE_GENERAL))); } bool radv_layout_can_fast_clear(const struct radv_image *image, VkImageLayout layout, unsigned queue_mask) { - return layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL && - queue_mask == (1u << RADV_QUEUE_GENERAL); + return layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; } bool radv_layout_dcc_compressed(const struct radv_image *image, |