radv: use LOAD_CONTEXT_REG to load the opaque buffer size on GFX10+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 29 Jun 2022 07:43:53 +0000 (09:43 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 4 Jul 2022 06:42:53 +0000 (08:42 +0200)
commit06a48e599e1f5aa7b4d5c4ea81f9b77e6dfb517d
tree900020d5e47f3e6b0b20cf3c9c71b9d66692eacc
parent4e797ac530b02a1d35a86061fe704524d6bab5a5
radv: use LOAD_CONTEXT_REG to load the opaque buffer size on GFX10+

For unknown reasons, COPY_DATA can hang on GFX10+ while it doesn't
hang on GFX9. Adding PFP_SYNC_ME before/after the COPY_DATA doesn't
fix the hang either.

Using a LOAD_CONTEXT_REG_INDEX packet shouldn't be needed unless the
driver supports preemption (shadow memory) which RADV doesn't support.

I don't have a real explanation but PFP_SYNC_ME+LOAD_CONTEXT_REG_INDEX
fixes a GPU hang with Space Engineers (game uses a bunch of consecutive
calls to vkCmdDrawIndirectByteCountEXT without anything in-between).

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5838
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17290>
src/amd/vulkan/radv_cmd_buffer.c