From 6279645fed28179bf0d8b0fc4b8e826b4566a8fb Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 29 Jul 2025 12:23:30 +0300 Subject: [PATCH] vulkan/runtime: drop some geometry shader hashing Following bc64ea2815 ("vulkan: fix shader linking with common pipelines") we're always linking pre-rasterization shaders together and the shader hashes are hashed together, so there is no point hashing : - a bitfield of active shaders - merged tesselation information Signed-off-by: Lionel Landwerlin Reviewed-by: Faith Ekstrand Part-of: --- src/vulkan/runtime/vk_pipeline.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/vulkan/runtime/vk_pipeline.c b/src/vulkan/runtime/vk_pipeline.c index ecf35ec82e0..c2dfcdafa87 100644 --- a/src/vulkan/runtime/vk_pipeline.c +++ b/src/vulkan/runtime/vk_pipeline.c @@ -1287,17 +1287,6 @@ vk_graphics_pipeline_compile_shaders(struct vk_device *device, _mesa_blake3_update(&blake3_ctx, state_blake3, sizeof(state_blake3)); _mesa_blake3_update(&blake3_ctx, layout_blake3, sizeof(layout_blake3)); - if (link_info->part_stages[p] & (VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT | - VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)) - _mesa_blake3_update(&blake3_ctx, &tess_info, sizeof(tess_info)); - - /* The set of geometry stages used together is used to generate the - * nextStage mask as well as VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT. - */ - const VkShaderStageFlags geom_stages = - all_stages & ~VK_SHADER_STAGE_FRAGMENT_BIT; - _mesa_blake3_update(&blake3_ctx, &geom_stages, sizeof(geom_stages)); - _mesa_blake3_final(&blake3_ctx, shader_key.blake3); if (cache != NULL) { @@ -1402,14 +1391,16 @@ vk_graphics_pipeline_compile_shaders(struct vk_device *device, shader_flags |= VK_SHADER_CREATE_LINK_STAGE_BIT_EXT; if ((link_info->part_stages[p] & VK_SHADER_STAGE_MESH_BIT_EXT) && - !(geom_stages & VK_SHADER_STAGE_TASK_BIT_EXT)) + !(all_stages & VK_SHADER_STAGE_TASK_BIT_EXT)) shader_flags = VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT; VkShaderStageFlags next_stage; if (stage->stage == MESA_SHADER_FRAGMENT) { next_stage = 0; } else if (i + 1 < stage_count) { - /* We hash geom_stages above so this is safe */ + /* We're always linking all the geometry shaders and hashing their + * hashes together, so this is safe. + */ next_stage = mesa_to_vk_shader_stage(stages[i + 1].stage); } else { /* We're the last geometry stage */