mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 14:20:11 +01:00
zink: don't add compute base pipeline to hash table
this is pointless since it has no lookup data Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
This commit is contained in:
parent
d0c8e70a64
commit
bbd58d1703
1 changed files with 7 additions and 2 deletions
|
|
@ -943,6 +943,7 @@ zink_destroy_compute_program(struct zink_context *ctx,
|
|||
VKSCR(DestroyPipeline)(screen->dev, pc_entry->pipeline, NULL);
|
||||
free(pc_entry);
|
||||
}
|
||||
VKSCR(DestroyPipeline)(screen->dev, comp->base_pipeline, NULL);
|
||||
VKSCR(DestroyShaderModule)(screen->dev, comp->module->shader, NULL);
|
||||
free(comp->module);
|
||||
|
||||
|
|
@ -978,6 +979,12 @@ zink_get_compute_pipeline(struct zink_screen *screen,
|
|||
if (pipeline == VK_NULL_HANDLE)
|
||||
return VK_NULL_HANDLE;
|
||||
|
||||
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;
|
||||
return state->pipeline;
|
||||
}
|
||||
|
||||
struct compute_pipeline_cache_entry *pc_entry = CALLOC_STRUCT(compute_pipeline_cache_entry);
|
||||
if (!pc_entry)
|
||||
return VK_NULL_HANDLE;
|
||||
|
|
@ -987,8 +994,6 @@ zink_get_compute_pipeline(struct zink_screen *screen,
|
|||
|
||||
entry = _mesa_hash_table_insert_pre_hashed(&comp->pipelines, state->final_hash, pc_entry, pc_entry);
|
||||
assert(entry);
|
||||
if (!comp->use_local_size && !comp->curr->num_uniforms && !comp->curr->has_nonseamless)
|
||||
comp->base_pipeline = pipeline;
|
||||
}
|
||||
|
||||
struct compute_pipeline_cache_entry *cache_entry = entry->data;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue