radv: fix hashing descriptor set layout

Shouldn't have pointers.

Fixes: 19f8d33876 ("radv: Use vk_descriptor_set_layout")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20250>
(cherry picked from commit 13f39da71a)
This commit is contained in:
Samuel Pitoiset 2022-12-09 15:59:52 +01:00 committed by Eric Engestrom
parent 57827e6903
commit 5e0dfcb9c7
2 changed files with 5 additions and 5 deletions

View file

@ -1210,7 +1210,7 @@
"description": "radv: fix hashing descriptor set layout",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "19f8d338761d124b24eac2d4703dc1346c8b4f9f"
},

View file

@ -516,11 +516,11 @@ radv_pipeline_layout_hash(struct radv_pipeline_layout *layout)
if (!set_layout)
continue;
/* Hash the entire set layout except for the vk_object_base and the reference counter. 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.
/* Hash the entire set layout except vk_descriptor_set_layout. 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.
*/
uint32_t hash_offset = sizeof(struct vk_object_base) + sizeof(uint32_t);
uint32_t hash_offset = sizeof(struct vk_descriptor_set_layout);
_mesa_sha1_update(&ctx, (const char *)set_layout + hash_offset,
set_layout->layout_size - hash_offset);
}