From 4873c38a4c0217db794ea386f7ea94b1bc0cd17d 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: (cherry picked from commit 626e3a6e34d72fd08c4d7c882bdbcfc25b9133f0) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_screen.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e987d8826ad..1dc64bf5e72 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -400,7 +400,7 @@ "description": "zink: don't clobber descriptor mode on multiple screen creation", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 1feb4da726d..8328138f46e 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2691,7 +2691,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config) return NULL; 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)