zink: only update gfx pipeline cache after creating a real pipeline

async pipelines may not require updates here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
This commit is contained in:
Mike Blumenkrantz 2021-09-01 13:58:31 -04:00
parent 7438d670dd
commit e515d9791e
2 changed files with 1 additions and 1 deletions

View file

@ -276,7 +276,6 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
debug_printf("vkCreateGraphicsPipelines failed\n");
return VK_NULL_HANDLE;
}
zink_screen_update_pipeline_cache(screen, &prog->base);
return pipeline;
}

View file

@ -853,6 +853,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
if (pipeline == VK_NULL_HANDLE)
return VK_NULL_HANDLE;
zink_screen_update_pipeline_cache(screen, &prog->base);
struct gfx_pipeline_cache_entry *pc_entry = CALLOC_STRUCT(gfx_pipeline_cache_entry);
if (!pc_entry)
return VK_NULL_HANDLE;