mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
zink: Fully initialize VkBufferViewCreateInfo for hashing
Makes hashing achieve higher hit rate, and valgrind happier.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13371>
(cherry picked from commit ae525da0e4)
This commit is contained in:
parent
2d6c11843d
commit
b67308a449
2 changed files with 5 additions and 2 deletions
|
|
@ -850,7 +850,7 @@
|
|||
"description": "zink: Fully initialize VkBufferViewCreateInfo for hashing",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -626,7 +626,10 @@ static VkBufferViewCreateInfo
|
|||
create_bvci(struct zink_context *ctx, struct zink_resource *res, enum pipe_format format, uint32_t offset, uint32_t range)
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
VkBufferViewCreateInfo bvci = {0};
|
||||
VkBufferViewCreateInfo bvci;
|
||||
// Zero whole struct (including alignment holes), so hash_bufferview
|
||||
// does not access potentially uninitialized data.
|
||||
memset(&bvci, 0, sizeof(bvci));
|
||||
bvci.sType = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO;
|
||||
bvci.pNext = NULL;
|
||||
bvci.buffer = res->obj->buffer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue