zink: fix win32 build
authorMichel Zou <xantares09@hotmail.com>
Thu, 18 Feb 2021 08:19:30 +0000 (09:19 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 19 Feb 2021 08:49:47 +0000 (08:49 +0000)
Fixes: 57575627c4cc3d91

Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9126>

src/gallium/drivers/zink/zink_screen.c

index f7add46..7ec0c16 100644 (file)
@@ -808,8 +808,10 @@ zink_destroy_screen(struct pipe_screen *pscreen)
 
    u_transfer_helper_destroy(pscreen->transfer_helper);
    zink_screen_update_pipeline_cache(screen);
+#ifdef ENABLE_SHADER_CACHE
    if (screen->disk_cache)
       disk_cache_wait_for_idle(screen->disk_cache);
+#endif
    disk_cache_destroy(screen->disk_cache);
    vkDestroyPipelineCache(screen->dev, screen->pipeline_cache, NULL);
 
@@ -1287,8 +1289,10 @@ 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)
       screen->driconf.dual_color_blend_by_location = driQueryOptionb(config->options, "dual_color_blend_by_location");
+#endif
 
    return screen;