zink: add ZINK_DEBUG=noopt
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 5 May 2023 16:58:03 +0000 (12:58 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 9 May 2023 22:16:21 +0000 (22:16 +0000)
it's often useful to disable optimized pipeline compiles for debugging

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22899>

docs/drivers/zink.rst
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_types.h

index 56e5e6c..0425aaf 100644 (file)
@@ -311,6 +311,8 @@ variable:
     Disable EXT_shader_object
   ``optimal_keys``
     Debug/use optimal_keys
+  ``noopt``
+    Disable async optimized pipeline compiles
 
 Vulkan Validation Layers
 ^^^^^^^^^^^^^^^^^^^^^^^^
index ffe68ad..66a37a4 100644 (file)
@@ -94,6 +94,7 @@ zink_debug_options[] = {
    { "flushsync", ZINK_DEBUG_FLUSHSYNC, "Force synchronous flushes/presents" },
    { "noshobj", ZINK_DEBUG_NOSHOBJ, "Disable EXT_shader_object" },
    { "optimal_keys", ZINK_DEBUG_OPTIMAL_KEYS, "Debug/use optimal_keys" },
+   { "noopt", ZINK_DEBUG_NOOPT, "Disable async optimized pipeline compiles" },
    DEBUG_NAMED_VALUE_END
 };
 
@@ -2593,6 +2594,8 @@ init_driver_workarounds(struct zink_screen *screen)
       screen->driver_workarounds.disable_optimized_compile = true;
       break;
    default:
+      if (zink_debug & ZINK_DEBUG_NOOPT)
+         screen->driver_workarounds.disable_optimized_compile = true;
       break;
    }
 }
index fe25a9b..d7a604c 100644 (file)
@@ -223,6 +223,7 @@ enum zink_debug {
    ZINK_DEBUG_FLUSHSYNC = (1<<12),
    ZINK_DEBUG_NOSHOBJ = (1<<13),
    ZINK_DEBUG_OPTIMAL_KEYS = (1<<14),
+   ZINK_DEBUG_NOOPT = (1<<15),
 };
 
 enum zink_pv_emulation_primitive {