mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
zink: fix surface/bufferview cache comparisons
these caches ignore pNext from the create info since the pNext cannot affect the eventual object that is created, so comparing it will break the hash table cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
This commit is contained in:
parent
7057a36359
commit
9924fecee6
1 changed files with 8 additions and 2 deletions
|
|
@ -69,13 +69,19 @@
|
|||
static bool
|
||||
equals_ivci(const void *a, const void *b)
|
||||
{
|
||||
return memcmp(a, b, sizeof(VkImageViewCreateInfo)) == 0;
|
||||
const uint8_t *pa = a;
|
||||
const uint8_t *pb = b;
|
||||
size_t offset = offsetof(VkImageViewCreateInfo, flags);
|
||||
return memcmp(pa + offset, pb + offset, sizeof(VkImageViewCreateInfo) - offset) == 0;
|
||||
}
|
||||
|
||||
static bool
|
||||
equals_bvci(const void *a, const void *b)
|
||||
{
|
||||
return memcmp(a, b, sizeof(VkBufferViewCreateInfo)) == 0;
|
||||
const uint8_t *pa = a;
|
||||
const uint8_t *pb = b;
|
||||
size_t offset = offsetof(VkBufferViewCreateInfo, flags);
|
||||
return memcmp(pa + offset, pb + offset, sizeof(VkBufferViewCreateInfo) - offset) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue