zink: init cache_put program fence on program creation
re-initializing here might overwrite an existing cache_put job cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17225>
This commit is contained in:
committed by
Marge Bot
parent
4c0a7a169d
commit
3d58642984
@@ -437,6 +437,7 @@ zink_create_gfx_program(struct zink_context *ctx,
|
||||
goto fail;
|
||||
|
||||
pipe_reference_init(&prog->base.reference, 1);
|
||||
util_queue_fence_init(&prog->base.cache_fence);
|
||||
|
||||
for (int i = 0; i < ZINK_SHADER_COUNT; ++i) {
|
||||
list_inithead(&prog->shader_cache[i][0][0]);
|
||||
@@ -548,6 +549,7 @@ zink_create_compute_program(struct zink_context *ctx, struct zink_shader *shader
|
||||
goto fail;
|
||||
|
||||
pipe_reference_init(&comp->base.reference, 1);
|
||||
util_queue_fence_init(&comp->base.cache_fence);
|
||||
comp->base.is_compute = true;
|
||||
|
||||
comp->curr = comp->module = CALLOC_STRUCT(zink_shader_module);
|
||||
|
||||
@@ -242,7 +242,6 @@ cache_put_job(void *data, void *gdata, int thread_index)
|
||||
void
|
||||
zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_program *pg)
|
||||
{
|
||||
util_queue_fence_init(&pg->cache_fence);
|
||||
if (!screen->disk_cache)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user