About Social Code
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2025-07-29 12:23:30 +0300
committerMarge Bot <marge-bot@fdo.invalid>2025-11-06 15:27:19 +0000
commit6279645fed28179bf0d8b0fc4b8e826b4566a8fb (patch)
tree5be4f403b283ee7b34bdf657a8bd45d4c89d6a46
parentfc6d17a2900ec8bed96748cbe6da9188f94b44b4 (diff)
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 <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
-rw-r--r--src/vulkan/runtime/vk_pipeline.c17
1 files 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 */