zink: malloc/sizeof mismatch

buffer_infos is VkBufferView* but malloc is using the
size of VkImageView. The size is the same but this
fixes a warning

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14335>
This commit is contained in:
Thomas H.P. Andersen 2021-12-29 11:19:39 +01:00 committed by Marge Bot
parent 495b2c537b
commit 4cc0548046
1 changed files with 1 additions and 1 deletions

View File

@ -4227,7 +4227,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
util_idalloc_alloc(&ctx->di.bindless[i].tex_slots);
util_idalloc_init(&ctx->di.bindless[i].img_slots, ZINK_MAX_BINDLESS_HANDLES);
util_idalloc_alloc(&ctx->di.bindless[i].img_slots);
ctx->di.bindless[i].buffer_infos = malloc(sizeof(VkImageView) * ZINK_MAX_BINDLESS_HANDLES);
ctx->di.bindless[i].buffer_infos = malloc(sizeof(VkBufferView) * ZINK_MAX_BINDLESS_HANDLES);
ctx->di.bindless[i].img_infos = malloc(sizeof(VkDescriptorImageInfo) * ZINK_MAX_BINDLESS_HANDLES);
util_dynarray_init(&ctx->di.bindless[i].updates, NULL);
util_dynarray_init(&ctx->di.bindless[i].resident, NULL);