mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: reduce hashed region of zink_descriptor_layout_key
only the first 3 members of VkDescriptorSetLayoutBinding are useful here Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13483>
This commit is contained in:
parent
103e93cbe6
commit
66a0d8204f
1 changed files with 3 additions and 1 deletions
|
|
@ -388,7 +388,9 @@ hash_descriptor_layout(const void *key)
|
|||
uint32_t hash = 0;
|
||||
const struct zink_descriptor_layout_key *k = key;
|
||||
hash = XXH32(&k->num_bindings, sizeof(unsigned), hash);
|
||||
hash = XXH32(k->bindings, k->num_bindings * sizeof(VkDescriptorSetLayoutBinding), hash);
|
||||
/* only hash first 3 members: no holes and the rest are always constant */
|
||||
for (unsigned i = 0; i < k->num_bindings; i++)
|
||||
hash = XXH32(&k->bindings[i], offsetof(VkDescriptorSetLayoutBinding, stageFlags), hash);
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue