mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 23:28:06 +02:00
zink: use FAIL_ON_PIPELINE_COMPILE_REQUIRED for GPL path
it should be low-cost to check for a cached+optimized pipeline on first compile, so do that to avoid unnecessary pipeline compiles Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25087>
This commit is contained in:
parent
d79a615cf8
commit
e4bca6adf1
1 changed files with 9 additions and 4 deletions
|
|
@ -213,11 +213,16 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
pc_entry->gpl.ikey = ikey;
|
||||
pc_entry->gpl.gkey = gkey;
|
||||
pc_entry->gpl.okey = okey;
|
||||
/* create the non-optimized pipeline first using fast-linking to avoid stuttering */
|
||||
pc_entry->pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, &gkey->pipeline, 1, okey->pipeline, false, false);
|
||||
/* try to hit optimized compile cache first if possible */
|
||||
if (!prog->is_separable)
|
||||
/* trigger async optimized pipeline compile if this was the fast-linked unoptimized pipeline */
|
||||
zink_gfx_program_compile_queue(ctx, pc_entry);
|
||||
pc_entry->pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, &gkey->pipeline, 1, okey->pipeline, true, true);
|
||||
if (!pc_entry->pipeline) {
|
||||
/* create the non-optimized pipeline first using fast-linking to avoid stuttering */
|
||||
pc_entry->pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, &gkey->pipeline, 1, okey->pipeline, false, false);
|
||||
if (!prog->is_separable)
|
||||
/* trigger async optimized pipeline compile if this was the fast-linked unoptimized pipeline */
|
||||
zink_gfx_program_compile_queue(ctx, pc_entry);
|
||||
}
|
||||
} else {
|
||||
/* optimize by default only when expecting precompiles in order to reduce stuttering */
|
||||
if (DYNAMIC_STATE != ZINK_DYNAMIC_VERTEX_INPUT2 && DYNAMIC_STATE != ZINK_DYNAMIC_VERTEX_INPUT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue