diff --git a/src/gallium/drivers/zink/zink_instance.py b/src/gallium/drivers/zink/zink_instance.py index bc0313b7c3e..b3c2451df27 100644 --- a/src/gallium/drivers/zink/zink_instance.py +++ b/src/gallium/drivers/zink/zink_instance.py @@ -55,9 +55,9 @@ EXTENSIONS = [ LAYERS = [ # if we have debug_util, allow a validation layer to be added. Layer("VK_LAYER_KHRONOS_validation", - conditions=["have_EXT_debug_utils"]), + conditions=["zink_debug & ZINK_DEBUG_VALIDATION"]), Layer("VK_LAYER_LUNARG_standard_validation", - conditions=["have_EXT_debug_utils", "!have_layer_KHRONOS_validation"]), + conditions=["zink_debug & ZINK_DEBUG_VALIDATION", "!have_layer_KHRONOS_validation"]), ] REPLACEMENTS = { @@ -146,11 +146,6 @@ zink_create_instance(struct zink_instance_info *instance_info) } } - // Clear have_EXT_debug_utils if we do not want debug info - if (!(zink_debug & ZINK_DEBUG_VALIDATION)) { - have_EXT_debug_utils = false; - } - // Build up the layers from the reported ones uint32_t layer_count = 0; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index d0f855f218d..ab1c4e590b0 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1612,7 +1612,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config) if (!screen->instance) goto fail; - if (screen->instance_info.have_EXT_debug_utils && !create_debug(screen)) + if (screen->instance_info.have_EXT_debug_utils && + (zink_debug & ZINK_DEBUG_VALIDATION) && !create_debug(screen)) debug_printf("ZINK: failed to setup debug utils\n"); choose_pdev(screen);