radv: Guard against misplaced RGP barrier markers.
authorTatsuyuki Ishi <ishitatsuyuki@gmail.com>
Wed, 1 Feb 2023 08:40:02 +0000 (17:40 +0900)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Jun 2023 11:55:03 +0000 (11:55 +0000)
commit5a85c4432c0073e0f458e5e3c8a74ee641b5edd0
tree3fdd74f6e129c42c667c988db9613cf4d52c2688
parent7c48e886ece6050afb956df9f8b051751d91bb0a
radv: Guard against misplaced RGP barrier markers.

RGP will crash if we emit a layout transition marker outside a barrier.
If this happens, trigger an assertion if its enabled or silently discard
the marker otherwise to avoid traces that cannot be opened.

Also, guard against attempts to start barrier markers recursively, since
this will corrupt the internal start/end matching.

Closes: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/7971>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21033>
src/amd/vulkan/layers/radv_sqtt_layer.c
src/amd/vulkan/meta/radv_meta_copy.c
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h