mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-14 07:30:18 +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>
(cherry picked from commit 9924fecee6)
This commit is contained in:
parent
e05e02e340
commit
700fded174
2 changed files with 9 additions and 3 deletions
|
|
@ -1012,7 +1012,7 @@
|
|||
"description": "zink: fix surface/bufferview cache comparisons",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"because_sha": null
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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