radv: Try to do a better job of dealing with L2 coherent images.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 5 Oct 2021 01:10:20 +0000 (03:10 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 Oct 2021 14:07:05 +0000 (14:07 +0000)
commitfd8210f27ede11583e3a5d55066cb61d9988357b
treedf2e4b74064528bb4e48dfddea3193b17cfba24c
parent64b237436a2bbdc5e111f97b5ace92154a87e958
radv: Try to do a better job of dealing with L2 coherent images.

Only try to invalidate L2 if we actually hit one of the incoherent images.

Note we may actually insert some extra flushes at the end of a command
buffer so that we may asume the caches are clean the start of the next
command buffer. However, on average I think that case is uncommon
enough that being able to make assumptions at the start of a cmdbuffer
is beneficial. Especially since MSAA is somewhat rare in more recent
games.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13239>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/si_cmd_buffer.c