diff --git a/src/vulkan/runtime/vk_pipeline.c b/src/vulkan/runtime/vk_pipeline.c index ecef45f3c75..a5042a9615f 100644 --- a/src/vulkan/runtime/vk_pipeline.c +++ b/src/vulkan/runtime/vk_pipeline.c @@ -125,6 +125,10 @@ vk_pipeline_hash_shader_stage(const VkPipelineShaderStageCreateInfo *info, struct mesa_sha1 ctx; _mesa_sha1_init(&ctx); + + assert(util_bitcount(info->stage) == 1); + _mesa_sha1_update(&ctx, &info->stage, sizeof(info->stage)); + if (module) { _mesa_sha1_update(&ctx, module->sha1, sizeof(module->sha1)); } else if (minfo) { @@ -142,9 +146,6 @@ vk_pipeline_hash_shader_stage(const VkPipelineShaderStageCreateInfo *info, _mesa_sha1_update(&ctx, info->pName, strlen(info->pName)); - assert(util_bitcount(info->stage) == 1); - _mesa_sha1_update(&ctx, &info->stage, sizeof(info->stage)); - if (info->pSpecializationInfo) { _mesa_sha1_update(&ctx, info->pSpecializationInfo->pMapEntries, info->pSpecializationInfo->mapEntryCount *