diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index 6a5570b2176..2053b7fc82e 100644 --- a/src/amd/vulkan/radv_descriptor_set.c +++ b/src/amd/vulkan/radv_descriptor_set.c @@ -503,7 +503,13 @@ VkResult radv_CreatePipelineLayout( } dynamic_offset_count += layout->set[set].dynamic_offset_count; dynamic_shader_stages |= layout->set[set].dynamic_offset_stages; - _mesa_sha1_update(&ctx, set_layout, set_layout->layout_size); + + /* Hash the entire set layout except for the vk_object_base. The + * rest of the set layout is carefully constructed to not have + * pointers so a full hash instead of a per-field hash should be ok. */ + _mesa_sha1_update(&ctx, + (const char*)set_layout + sizeof(struct vk_object_base), + set_layout->layout_size - sizeof(struct vk_object_base)); } layout->dynamic_offset_count = dynamic_offset_count;