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>
This commit is contained in:
committed by
Marge Bot
parent
4878e35159
commit
ae525da0e4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user