zink: move compute pipeline cache update to caller

this is more flexible

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
This commit is contained in:
Mike Blumenkrantz 2022-08-12 11:29:15 -04:00 committed by Marge Bot
parent 1cc6cecc3a
commit e1ad7bf0b7
2 changed files with 1 additions and 1 deletions

View file

@ -413,7 +413,6 @@ zink_create_compute_pipeline(struct zink_screen *screen, struct zink_compute_pro
mesa_loge("ZINK: vkCreateComputePipelines failed (%s)", vk_Result_to_str(result));
return VK_NULL_HANDLE;
}
zink_screen_update_pipeline_cache(screen, &comp->base);
return pipeline;
}

View file

@ -993,6 +993,7 @@ zink_get_compute_pipeline(struct zink_screen *screen,
if (pipeline == VK_NULL_HANDLE)
return VK_NULL_HANDLE;
zink_screen_update_pipeline_cache(screen, &comp->base);
if (!comp->use_local_size && !comp->curr->num_uniforms && !comp->curr->has_nonseamless) {
/* don't add base pipeline to cache */
state->pipeline = comp->base_pipeline = pipeline;