mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
radv: Don't retile read-only images.
Avoid unnessecary work on FOREIGN queue release barriers. If we can't modify the image there can't be a situation where we need to update the presentable dcc data. Signed-off-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16371>
This commit is contained in:
parent
6bf4ae002a
commit
29fbc88d6b
3 changed files with 8 additions and 4 deletions
|
|
@ -8263,6 +8263,10 @@ static void
|
|||
radv_retile_transition(struct radv_cmd_buffer *cmd_buffer, struct radv_image *image,
|
||||
VkImageLayout src_layout, VkImageLayout dst_layout, unsigned dst_queue_mask)
|
||||
{
|
||||
/* If the image is read-only, we don't have to retile DCC because it can't change. */
|
||||
if (!(image->usage & RADV_IMAGE_USAGE_WRITE_BITS))
|
||||
return;
|
||||
|
||||
if (src_layout != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR &&
|
||||
(dst_layout == VK_IMAGE_LAYOUT_PRESENT_SRC_KHR ||
|
||||
(dst_queue_mask & (1u << RADV_QUEUE_FOREIGN))))
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@
|
|||
|
||||
#include "gfx10_format_table.h"
|
||||
|
||||
static const VkImageUsageFlagBits RADV_IMAGE_USAGE_WRITE_BITS =
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
|
||||
static unsigned
|
||||
radv_choose_tiling(struct radv_device *device, const VkImageCreateInfo *pCreateInfo,
|
||||
VkFormat format)
|
||||
|
|
|
|||
|
|
@ -2093,6 +2093,10 @@ bool radv_dcc_formats_compatible(VkFormat format1, VkFormat format2, bool *sign_
|
|||
bool radv_is_atomic_format_supported(VkFormat format);
|
||||
bool radv_device_supports_etc(struct radv_physical_device *physical_device);
|
||||
|
||||
static const VkImageUsageFlags RADV_IMAGE_USAGE_WRITE_BITS =
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
|
||||
struct radv_image_plane {
|
||||
VkFormat format;
|
||||
struct radeon_surf surface;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue