radv: force RADV_DEBUG=syncshaders when RADV_TRACE_FILE is used
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 26 Aug 2020 15:28:46 +0000 (17:28 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 1 Sep 2020 06:27:46 +0000 (08:27 +0200)
It's a requirement to be able to identify the first bad draw or
dispatch call.

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/6471>

src/amd/vulkan/radv_device.c

index 31f486d3d75615531c9fc29a595f14ad2c757561..d1a960eafd8b0d6705b92209d67f5acf1f0db7ed 100644 (file)
@@ -2792,6 +2792,12 @@ VkResult radv_CreateDevice(
                fprintf(stderr, "*****************************************************************************\n");
 
                fprintf(stderr, "Trace file will be dumped to %s\n", filename);
+
+               /* Wait for idle after every draw/dispatch to identify the
+                * first bad call.
+                */
+               device->instance->debug_flags |= RADV_DEBUG_SYNC_SHADERS;
+
                radv_dump_enabled_options(device, stderr);
        }