vulkan: Re-order pipeline hashing

Match the order in vkPipelineShaderStageCreateInfo

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17337>
This commit is contained in:
Jason Ekstrand 2022-07-07 13:56:08 -05:00 committed by Marge Bot
parent e1ee201722
commit a73c4d5098
1 changed files with 4 additions and 3 deletions

View File

@ -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 *