radv: fix fast clearing depth-only or stencil-only aspects with HTILE

DB isn't coherent with L2 on GFX6-8. This is needed when the
clear HTILE mask path is selected.

This fixes an issue with avatars in Heroes of The Storm.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3362
Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10277>
This commit is contained in:
Samuel Pitoiset 2021-04-16 09:25:42 +02:00 committed by Marge Bot
parent 00ff60f799
commit e4c0724dc6
1 changed files with 2 additions and 1 deletions

View File

@ -965,7 +965,8 @@ radv_fast_clear_depth(struct radv_cmd_buffer *cmd_buffer, const struct radv_imag
enum radv_cmd_flush_bits bits =
radv_src_access_flush(cmd_buffer, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT,
iview->image) |
radv_dst_access_flush(cmd_buffer, VK_ACCESS_SHADER_WRITE_BIT, iview->image);
radv_dst_access_flush(cmd_buffer, VK_ACCESS_SHADER_WRITE_BIT |
VK_ACCESS_SHADER_READ_BIT, iview->image);
cmd_buffer->state.flush_bits |= bits & ~*pre_flush;
*pre_flush |= cmd_buffer->state.flush_bits;
}