From 513fcc37d9363f015d05ec9dff7618529cc91d49 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 22 Mar 2022 15:26:55 -0400 Subject: [PATCH] zink: move drirc handling up this can modify instance creation Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/zink_screen.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 38936265b8c..b75e61bc675 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2109,6 +2109,14 @@ zink_internal_create_screen(const struct pipe_screen_config *config) } screen->instance_info.loader_version = zink_get_loader_version(); +#if WITH_XMLCONFIG + if (config) { + driParseConfigFiles(config->options, config->options_info, 0, "zink", + NULL, NULL, NULL, 0, NULL, 0); + screen->driconf.dual_color_blend_by_location = driQueryOptionb(config->options, "dual_color_blend_by_location"); + //screen->driconf.inline_uniforms = driQueryOptionb(config->options, "radeonsi_inline_uniforms"); + } +#endif screen->instance = zink_create_instance(&screen->instance_info); if (!screen->instance) @@ -2228,14 +2236,6 @@ zink_internal_create_screen(const struct pipe_screen_config *config) slab_create_parent(&screen->transfer_pool, sizeof(struct zink_transfer), 16); -#if WITH_XMLCONFIG - if (config) { - driParseConfigFiles(config->options, config->options_info, 0, "zink", - NULL, NULL, NULL, 0, NULL, 0); - screen->driconf.dual_color_blend_by_location = driQueryOptionb(config->options, "dual_color_blend_by_location"); - //screen->driconf.inline_uniforms = driQueryOptionb(config->options, "radeonsi_inline_uniforms"); - } -#endif screen->driconf.inline_uniforms = debug_get_bool_option("ZINK_INLINE_UNIFORMS", screen->is_cpu); screen->total_video_mem = get_video_mem(screen);