mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
zink: change zink_gfx_program::last_pipeline -> struct zink_gfx_pipeline_cache_entry
this ensures that the latest version of the pipeline pointer in the cache entry will always be used Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18961>
This commit is contained in:
parent
b54929ac27
commit
aed4e716d0
2 changed files with 3 additions and 3 deletions
|
|
@ -208,7 +208,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
const int rp_idx = state->render_pass ? 1 : 0;
|
||||
if (DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT || DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT2) {
|
||||
if (prog->last_finalized_hash[rp_idx][idx] == state->final_hash && !prog->inline_variants && likely(prog->last_pipeline[rp_idx][idx])) {
|
||||
state->pipeline = prog->last_pipeline[rp_idx][idx];
|
||||
state->pipeline = prog->last_pipeline[rp_idx][idx]->pipeline;
|
||||
return state->pipeline;
|
||||
}
|
||||
}
|
||||
|
|
@ -260,7 +260,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
state->pipeline = cache_entry->pipeline;
|
||||
if (DYNAMIC_STATE >= ZINK_DYNAMIC_VERTEX_INPUT) {
|
||||
prog->last_finalized_hash[rp_idx][idx] = state->final_hash;
|
||||
prog->last_pipeline[rp_idx][idx] = state->pipeline;
|
||||
prog->last_pipeline[rp_idx][idx] = cache_entry;
|
||||
}
|
||||
return state->pipeline;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ struct zink_gfx_program {
|
|||
uint8_t inline_variants; //which stages are using inlined uniforms
|
||||
|
||||
uint32_t last_finalized_hash[2][4]; //[dynamic, renderpass][primtype idx]
|
||||
VkPipeline last_pipeline[2][4]; //[dynamic, renderpass][primtype idx]
|
||||
struct zink_gfx_pipeline_cache_entry *last_pipeline[2][4]; //[dynamic, renderpass][primtype idx]
|
||||
|
||||
struct set libs; //zink_gfx_library_key -> VkPipeline
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue