mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
Revert "zink: store last pipeline directly for zink_gfx_program::last_pipeline"
This reverts commitbe8b7980e6. Store the cache entry so that the fast path picks up the optimized pipeline when its available from a background optimized_compile_job(). Observed traces where it would take the fast path back and forth using an unoptimized pipeline and never pick up the optimized pipeline leading to >50% fps drop. Signed-off-by: Juston Li <justonli@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28440> (cherry picked from commitd6978b1af2)
This commit is contained in:
parent
6c4a85a04e
commit
c34dc4bebf
5 changed files with 6 additions and 6 deletions
|
|
@ -1994,7 +1994,7 @@
|
|||
"description": "Revert \"zink: store last pipeline directly for zink_gfx_program::last_pipeline\"",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "be8b7980e66f3526d7c1eb9b137772fb6fc90a96",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ traces:
|
|||
text: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8986
|
||||
TheRavenRemastered/Raven-f10900-v2.trace:
|
||||
gl-zink-anv-tgl:
|
||||
checksum: db7b901177e7ac00cc489e0e13f71f76
|
||||
checksum: e910141d9520739c653fa7de0d8a1c9b
|
||||
TombRaider2013/TombRaider-f1430-v2.trace:
|
||||
gl-zink-anv-tgl:
|
||||
label: [crash]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ traces:
|
|||
checksum: 433b69bea68cfe81914b857bbdc60ea5
|
||||
gputest/pixmark-piano-v2.trace:
|
||||
gl-zink-anv-tgl:
|
||||
checksum: 4c7afcce5d87ec2bced65e92a1c9a41c
|
||||
checksum: 9e7b3f2d38e6cea705af8161cfd41465
|
||||
gputest/triangle-v2.trace:
|
||||
gl-zink-anv-tgl:
|
||||
checksum: 5f694874b15bcd7a3689b387c143590b
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
!prog->inline_variants && likely(prog->last_pipeline[rp_idx][idx]) &&
|
||||
/* this data is too big to compare in the fast-path */
|
||||
likely(!prog->shaders[MESA_SHADER_FRAGMENT]->fs.legacy_shadow_mask)) {
|
||||
state->pipeline = prog->last_pipeline[rp_idx][idx];
|
||||
state->pipeline = prog->last_pipeline[rp_idx][idx]->pipeline;
|
||||
return state->pipeline;
|
||||
}
|
||||
}
|
||||
|
|
@ -245,7 +245,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
/* update states for fastpath */
|
||||
if (DYNAMIC_STATE >= ZINK_DYNAMIC_VERTEX_INPUT) {
|
||||
prog->last_finalized_hash[rp_idx][idx] = state->final_hash;
|
||||
prog->last_pipeline[rp_idx][idx] = cache_entry->pipeline;
|
||||
prog->last_pipeline[rp_idx][idx] = cache_entry;
|
||||
}
|
||||
return state->pipeline;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1137,7 +1137,7 @@ struct zink_gfx_program {
|
|||
uint32_t last_variant_hash;
|
||||
|
||||
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 zink_gfx_lib_cache *libs;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue