mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
zink: don't fetch/update pipeline cache for separate shader programs
this is illegal Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246>
This commit is contained in:
parent
ffd91ee7a8
commit
66f2a1c526
2 changed files with 4 additions and 3 deletions
|
|
@ -708,10 +708,11 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
|
|||
} else {
|
||||
ctx->dirty_gfx_stages |= ctx->shader_stages;
|
||||
prog = create_gfx_program_separable(ctx, ctx->gfx_stages, ctx->gfx_pipeline_state.dyn_state2.vertices_per_patch);
|
||||
zink_screen_get_pipeline_cache(zink_screen(ctx->base.screen), &prog->base, false);
|
||||
_mesa_hash_table_insert_pre_hashed(ht, hash, prog->shaders, prog);
|
||||
if (!prog->is_separable)
|
||||
if (!prog->is_separable) {
|
||||
zink_screen_get_pipeline_cache(zink_screen(ctx->base.screen), &prog->base, false);
|
||||
generate_gfx_program_modules_optimal(ctx, zink_screen(ctx->base.screen), prog, &ctx->gfx_pipeline_state);
|
||||
}
|
||||
}
|
||||
simple_mtx_unlock(&ctx->program_lock[zink_program_cache_stages(ctx->shader_stages)]);
|
||||
if (prog && prog != ctx->curr_program)
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ cache_put_job(void *data, void *gdata, int thread_index)
|
|||
void
|
||||
zink_screen_update_pipeline_cache(struct zink_screen *screen, struct zink_program *pg, bool in_thread)
|
||||
{
|
||||
if (!screen->disk_cache)
|
||||
if (!screen->disk_cache || !pg->pipeline_cache)
|
||||
return;
|
||||
|
||||
if (in_thread)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue