mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
radv: Fix mis-sizing of pipeline_flags in radv_hash_rt_shaders.
pipeline_flags was 64-bit yet only the first 4 bytes were hashed. Luckily, the mask included no flag above the 32nd bit, so this was technically working fine. Still, it's better to use explicit sizeof constructs to be more resilient to accidental type changes. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26145>
This commit is contained in:
parent
768c5934d0
commit
ef414a8231
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ radv_hash_rt_shaders(unsigned char *hash, const VkRayTracingPipelineCreateInfoKH
|
|||
VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR |
|
||||
VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR |
|
||||
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, 4);
|
||||
_mesa_sha1_update(&ctx, &pipeline_flags, sizeof(pipeline_flags));
|
||||
|
||||
_mesa_sha1_update(&ctx, &flags, 4);
|
||||
_mesa_sha1_final(&ctx, hash);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue