zink: add ZINK_DEBUG=noshobj to disable EXT_shader_object
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 3 Apr 2023 16:52:32 +0000 (12:52 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Apr 2023 01:33:17 +0000 (01:33 +0000)
for debugging/testing

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

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

index 08ab495..1ec3b86 100644 (file)
@@ -307,6 +307,8 @@ variable:
     Print info about mapped VRAM
   ``flushsync``
     Force synchronous flushes/presents
+  ``noshobj``
+    Disable EXT_shader_object
 
 Vulkan Validation Layers
 ^^^^^^^^^^^^^^^^^^^^^^^^
index 75d2e44..acdbc24 100644 (file)
@@ -92,6 +92,7 @@ zink_debug_options[] = {
    { "norp", ZINK_DEBUG_NORP, "Disable renderpass tracking/optimizations" },
    { "map", ZINK_DEBUG_MAP, "Track amount of mapped VRAM" },
    { "flushsync", ZINK_DEBUG_FLUSHSYNC, "Force synchronous flushes/presents" },
+   { "noshobj", ZINK_DEBUG_NOSHOBJ, "Disable EXT_shader_object" },
    DEBUG_NAMED_VALUE_END
 };
 
@@ -2409,7 +2410,7 @@ init_driver_workarounds(struct zink_screen *screen)
    }
    /* TODO: maybe compile multiple variants for different set counts for compact mode? */
    if (screen->info.props.limits.maxBoundDescriptorSets < ZINK_DESCRIPTOR_ALL_TYPES ||
-       zink_debug & ZINK_DEBUG_COMPACT)
+       zink_debug & (ZINK_DEBUG_COMPACT | ZINK_DEBUG_NOSHOBJ))
       screen->info.have_EXT_shader_object = false;
    if (screen->info.line_rast_feats.stippledRectangularLines &&
        screen->info.line_rast_feats.stippledBresenhamLines &&
index 9a95914..54cbb47 100644 (file)
@@ -221,6 +221,7 @@ enum zink_debug {
    ZINK_DEBUG_NORP = (1<<10),
    ZINK_DEBUG_MAP = (1<<11),
    ZINK_DEBUG_FLUSHSYNC = (1<<12),
+   ZINK_DEBUG_NOSHOBJ = (1<<13),
 };
 
 enum zink_pv_emulation_primitive {