From 626e3a6e34d72fd08c4d7c882bdbcfc25b9133f0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 10 Jul 2023 14:29:36 -0400 Subject: [PATCH] zink: don't clobber descriptor mode on multiple screen creation the env var should only ever be read if the mode is unset cc: mesa-stable Reviewed-by: Adam Jackson Part-of: --- src/gallium/drivers/zink/zink_screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 08b564e2c50..a2c30d96a13 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2799,7 +2799,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config) } zink_debug = debug_get_option_zink_debug(); - zink_descriptor_mode = debug_get_option_zink_descriptor_mode(); + if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) + zink_descriptor_mode = debug_get_option_zink_descriptor_mode(); screen->threaded = util_get_cpu_caps()->nr_cpus > 1 && debug_get_bool_option("GALLIUM_THREAD", util_get_cpu_caps()->nr_cpus > 1); if (zink_debug & ZINK_DEBUG_FLUSHSYNC)