radv: Use sizeof(flags) instead of hardcoded size in radv_hash_shaders.

For consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26145>
This commit is contained in:
Tatsuyuki Ishi 2023-11-10 22:26:27 +09:00 committed by Marge Bot
parent ef414a8231
commit 325d650c6e

View File

@ -63,7 +63,7 @@ radv_hash_shaders(unsigned char *hash, const struct radv_shader_stage *stages, u
_mesa_sha1_update(&ctx, stages[s].shader_sha1, sizeof(stages[s].shader_sha1));
}
_mesa_sha1_update(&ctx, &flags, 4);
_mesa_sha1_update(&ctx, &flags, sizeof(flags));
_mesa_sha1_final(&ctx, hash);
}
@ -120,7 +120,7 @@ radv_hash_rt_shaders(unsigned char *hash, const VkRayTracingPipelineCreateInfoKH
VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR | VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR);
_mesa_sha1_update(&ctx, &pipeline_flags, sizeof(pipeline_flags));
_mesa_sha1_update(&ctx, &flags, 4);
_mesa_sha1_update(&ctx, &flags, sizeof(flags));
_mesa_sha1_final(&ctx, hash);
}