diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index b0b78726656..aeed4601409 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -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) diff --git a/src/gallium/drivers/zink/zink_pipeline.h b/src/gallium/drivers/zink/zink_pipeline.h index b45c769dee4..7b050f15efb 100644 --- a/src/gallium/drivers/zink/zink_pipeline.h +++ b/src/gallium/drivers/zink/zink_pipeline.h @@ -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, diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 53dd1ffb0af..a9df09415ae 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -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) { diff --git a/src/gallium/drivers/zink/zink_program_state.hpp b/src/gallium/drivers/zink/zink_program_state.hpp index c23237ad98b..7b604c1cf8f 100644 --- a/src/gallium/drivers/zink/zink_program_state.hpp +++ b/src/gallium/drivers/zink/zink_program_state.hpp @@ -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);