mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
zink: stop creating GPL inputs for mesh
this is unnecessary Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37470>
This commit is contained in:
parent
ad3a445f96
commit
224f0f769b
4 changed files with 4 additions and 21 deletions
|
|
@ -930,21 +930,6 @@ zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_pr
|
|||
}
|
||||
|
||||
|
||||
/* vertex input pipeline library states with mesh: nothing matters */
|
||||
struct zink_gfx_input_key *
|
||||
zink_find_or_create_input_mesh(struct zink_context *ctx)
|
||||
{
|
||||
uint32_t hash = GFX_INPUT_MESH;
|
||||
struct set_entry *he = _mesa_set_search_pre_hashed(&ctx->gfx_inputs, hash, &hash);
|
||||
if (!he) {
|
||||
struct zink_gfx_input_key *ikey = rzalloc(ctx, struct zink_gfx_input_key);
|
||||
ikey->idx = hash;
|
||||
ikey->pipeline = zink_create_mesh_pipeline_input(zink_screen(ctx->base.screen));
|
||||
he = _mesa_set_add_pre_hashed(&ctx->gfx_inputs, hash, ikey);
|
||||
}
|
||||
return (struct zink_gfx_input_key *)he->key;
|
||||
}
|
||||
|
||||
/* vertex input pipeline library states with dynamic vertex input: only the topology matters */
|
||||
struct zink_gfx_input_key *
|
||||
zink_find_or_create_input_dynamic(struct zink_context *ctx, VkPrimitiveTopology vkmode)
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ struct zink_gfx_input_key *
|
|||
zink_find_or_create_input(struct zink_context *ctx, VkPrimitiveTopology vkmode);
|
||||
struct zink_gfx_input_key *
|
||||
zink_find_or_create_input_dynamic(struct zink_context *ctx, VkPrimitiveTopology vkmode);
|
||||
struct zink_gfx_input_key *
|
||||
zink_find_or_create_input_mesh(struct zink_context *ctx);
|
||||
|
||||
VkPipeline
|
||||
zink_create_gfx_pipeline(struct zink_screen *screen,
|
||||
|
|
|
|||
|
|
@ -936,7 +936,7 @@ optimized_compile_job(void *data, void *gdata, int thread_index)
|
|||
bool is_mesh = !!pc_entry->prog->shaders[MESA_SHADER_MESH];
|
||||
VkPrimitiveTopology vkmode = is_mesh ? VK_PRIMITIVE_TOPOLOGY_MAX_ENUM : zink_primitive_topology(pc_entry->state.gfx_prim_mode);
|
||||
if (pc_entry->gpl.gkey)
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, pc_entry->prog, pc_entry->gpl.ikey->pipeline, &pc_entry->gpl.gkey->pipeline, 1, pc_entry->gpl.okey->pipeline, true, false);
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, pc_entry->prog, pc_entry->gpl.ikey ? pc_entry->gpl.ikey->pipeline : VK_NULL_HANDLE, &pc_entry->gpl.gkey->pipeline, 1, pc_entry->gpl.okey->pipeline, true, false);
|
||||
else
|
||||
pipeline = zink_create_gfx_pipeline(screen, pc_entry->prog, pc_entry->prog->objs, &pc_entry->state, pc_entry->state.element_state->binding_map, vkmode, true);
|
||||
if (pipeline) {
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
gkey = zink_create_pipeline_lib(screen, prog, &ctx->gfx_pipeline_state);
|
||||
}
|
||||
simple_mtx_unlock(&prog->libs->lock);
|
||||
struct zink_gfx_input_key *ikey = IS_MESH ? zink_find_or_create_input_mesh(ctx) :
|
||||
struct zink_gfx_input_key *ikey = IS_MESH ? NULL :
|
||||
DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT ?
|
||||
zink_find_or_create_input_dynamic(ctx, vkmode) :
|
||||
zink_find_or_create_input(ctx, vkmode);
|
||||
|
|
@ -260,10 +260,10 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
pc_entry->gpl.okey = okey;
|
||||
/* try to hit optimized compile cache first if possible */
|
||||
if (!prog->is_separable)
|
||||
pc_entry->pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, &gkey->pipeline, 1, okey->pipeline, true, true);
|
||||
pc_entry->pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey ? ikey->pipeline : VK_NULL_HANDLE, &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);
|
||||
pc_entry->pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey ? ikey->pipeline : VK_NULL_HANDLE, &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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue