mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
zink: add a param to allow zink_screen_update_pipeline_cache to run directly
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
This commit is contained in:
parent
e1ad7bf0b7
commit
b2696ca58e
4 changed files with 8 additions and 5 deletions
|
|
@ -993,7 +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);
|
||||
zink_screen_update_pipeline_cache(screen, &comp->base, false);
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -251,7 +251,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);
|
||||
zink_screen_update_pipeline_cache(screen, &prog->base, false);
|
||||
struct gfx_pipeline_cache_entry *pc_entry = CALLOC_STRUCT(gfx_pipeline_cache_entry);
|
||||
if (!pc_entry)
|
||||
return VK_NULL_HANDLE;
|
||||
|
|
|
|||
|
|
@ -231,12 +231,15 @@ cache_put_job(void *data, void *gdata, int thread_index)
|
|||
}
|
||||
|
||||
void
|
||||
zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_program *pg)
|
||||
zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_program *pg, bool in_thread)
|
||||
{
|
||||
if (!screen->disk_cache)
|
||||
return;
|
||||
|
||||
util_queue_add_job(&screen->cache_put_thread, pg, &pg->cache_fence, cache_put_job, NULL, 0);
|
||||
if (in_thread)
|
||||
cache_put_job(pg, screen, 0);
|
||||
else
|
||||
util_queue_add_job(&screen->cache_put_thread, pg, &pg->cache_fence, cache_put_job, NULL, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ zink_is_depth_format_supported(struct zink_screen *screen, VkFormat format);
|
|||
#define GET_PROC_ADDR_INSTANCE_LOCAL(screen, instance, x) PFN_vk##x vk_##x = (PFN_vk##x)(screen)->vk_GetInstanceProcAddr(instance, "vk"#x)
|
||||
|
||||
void
|
||||
zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_program *pg);
|
||||
zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_program *pg, bool in_thread);
|
||||
|
||||
void
|
||||
zink_screen_get_pipeline_cache(struct zink_screen *screen, struct zink_program *pg, bool in_thread);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue