radv: Add workaround for hang in The Surge 2.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 24 Sep 2019 00:53:21 +0000 (02:53 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 24 Sep 2019 09:51:40 +0000 (09:51 +0000)
Released today and hangs on RADV. We don't have the root cause yet,
but this should unblock people playing the game.

No drirc because the radv debugflags are not usable from drirc and
I want this backported.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c

index 4aeaedd85a289e47165ddc77a6760119a585bb98..af425b39b96b61fbedcb903235cc070fb87cc1dc 100644 (file)
@@ -555,6 +555,14 @@ radv_handle_per_app_options(struct radv_instance *instance,
                         */
                        instance->perftest_flags |= RADV_PERFTEST_SHADER_BALLOT;
                }
+       } else if (!strcmp(name, "Fledge")) {
+               /*
+                * Zero VRAM for "The Surge 2"
+                *
+                * This avoid a hang when when rendering any level. Likely
+                * uninitialized data in an indirect draw.
+                */
+               instance->debug_flags |= RADV_DEBUG_ZERO_VRAM;
        }
 }