diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index e480d3c3239..c4feecf1526 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -212,21 +212,6 @@ radv_pipeline_get_shader_key(const struct radv_device *device, const VkPipelineS return key; } -struct radv_pipeline_key -radv_generate_pipeline_key(const struct radv_device *device, const VkPipelineShaderStageCreateInfo *stages, - const unsigned num_stages, VkPipelineCreateFlags2KHR flags, const void *pNext) -{ - struct radv_pipeline_key key = {0}; - - for (uint32_t i = 0; i < num_stages; i++) { - gl_shader_stage s = vk_to_mesa_shader_stage(stages[i].stage); - - key.stage_info[s] = radv_pipeline_get_shader_key(device, &stages[i], flags, pNext); - } - - return key; -} - void radv_pipeline_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, const struct radv_pipeline_layout *pipeline_layout, diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 2f4afae60d7..e88c1cf8873 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -1968,11 +1968,17 @@ radv_generate_graphics_pipeline_key(const struct radv_device *device, const stru const struct vk_graphics_pipeline_state *state, VkGraphicsPipelineLibraryFlagBitsEXT lib_flags) { - struct radv_pipeline_key key = radv_generate_pipeline_key(device, pCreateInfo->pStages, pCreateInfo->stageCount, - pipeline->base.create_flags, pCreateInfo->pNext); + struct radv_pipeline_key key = {0}; key.gfx_state = radv_generate_graphics_state_key(device, pipeline, state, lib_flags); + for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) { + const VkPipelineShaderStageCreateInfo *stage = &pCreateInfo->pStages[i]; + gl_shader_stage s = vk_to_mesa_shader_stage(stage->stage); + + key.stage_info[s] = radv_pipeline_get_shader_key(device, stage, pipeline->base.create_flags, pCreateInfo->pNext); + } + return key; } diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 50b93bfd018..ac2f5a170f8 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -2318,11 +2318,6 @@ struct radv_graphics_pipeline_create_info { uint32_t custom_blend_mode; }; -struct radv_pipeline_key radv_generate_pipeline_key(const struct radv_device *device, - const VkPipelineShaderStageCreateInfo *stages, - const unsigned num_stages, VkPipelineCreateFlags2KHR flags, - const void *pNext); - struct radv_shader_stage_key radv_pipeline_get_shader_key(const struct radv_device *device, const VkPipelineShaderStageCreateInfo *stage, VkPipelineCreateFlags2KHR flags, const void *pNext);