mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
radv: do not flush L2 metadata on GFX12
This doesn't seem to exist. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29482>
This commit is contained in:
parent
b795685da2
commit
2786928ce8
1 changed files with 6 additions and 3 deletions
|
|
@ -6917,6 +6917,7 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, VkAccessFlags2 dst_fla
|
|||
enum radv_cmd_flush_bits flush_bits = 0;
|
||||
bool flush_CB = true, flush_DB = true;
|
||||
bool image_is_coherent = image ? image->l2_coherent : false;
|
||||
bool flush_L2_metadata = false;
|
||||
|
||||
if (image) {
|
||||
if (!(image->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)) {
|
||||
|
|
@ -6930,6 +6931,8 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, VkAccessFlags2 dst_fla
|
|||
has_DB_meta = false;
|
||||
}
|
||||
|
||||
flush_L2_metadata = (has_CB_meta || has_DB_meta) && pdev->info.gfx_level < GFX12;
|
||||
|
||||
/* All the L2 invalidations below are not the CB/DB. So if there are no incoherent images
|
||||
* in the L2 cache in CB/DB mode then they are already usable from all the other L2 clients. */
|
||||
image_is_coherent |= can_skip_buffer_l2_flushes(device) && !cmd_buffer->state.rb_noncoherent_dirty;
|
||||
|
|
@ -6962,7 +6965,7 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, VkAccessFlags2 dst_fla
|
|||
case VK_ACCESS_2_TRANSFER_WRITE_BIT:
|
||||
flush_bits |= RADV_CMD_FLAG_INV_VCACHE;
|
||||
|
||||
if (has_CB_meta || has_DB_meta)
|
||||
if (flush_L2_metadata)
|
||||
flush_bits |= RADV_CMD_FLAG_INV_L2_METADATA;
|
||||
if (!image_is_coherent)
|
||||
flush_bits |= RADV_CMD_FLAG_INV_L2;
|
||||
|
|
@ -6980,7 +6983,7 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, VkAccessFlags2 dst_fla
|
|||
FALLTHROUGH;
|
||||
case VK_ACCESS_2_SHADER_SAMPLED_READ_BIT:
|
||||
flush_bits |= RADV_CMD_FLAG_INV_VCACHE;
|
||||
if (has_CB_meta || has_DB_meta)
|
||||
if (flush_L2_metadata)
|
||||
flush_bits |= RADV_CMD_FLAG_INV_L2_METADATA;
|
||||
if (!image_is_coherent)
|
||||
flush_bits |= RADV_CMD_FLAG_INV_L2;
|
||||
|
|
@ -7010,7 +7013,7 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, VkAccessFlags2 dst_fla
|
|||
flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB_META;
|
||||
break;
|
||||
case VK_ACCESS_2_MEMORY_READ_BIT:
|
||||
if (has_CB_meta || has_DB_meta)
|
||||
if (flush_L2_metadata)
|
||||
flush_bits |= RADV_CMD_FLAG_INV_L2_METADATA;
|
||||
FALLTHROUGH;
|
||||
case VK_ACCESS_2_MEMORY_WRITE_BIT:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue