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 <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24075>
(cherry picked from commit 626e3a6e34)
This commit is contained in:
Mike Blumenkrantz 2023-07-10 14:29:36 -04:00 committed by Dylan Baker
parent 0c84f8d915
commit af25afc9d6
2 changed files with 3 additions and 2 deletions

View file

@ -22924,7 +22924,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,
"notes": null

View file

@ -2800,7 +2800,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)