radv: zero the bo descriptor array when allocating a new set

this must be reset to avoid issues when using VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT
when some descriptors in the set may not have been bound

fixes #4219

Fixes: 126d5adb11 ("radv: Use host memory pool for non-freeable descriptors.")

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8840>
This commit is contained in:
Mike Blumenkrantz 2021-02-03 07:17:17 -05:00
parent 2f534c2e2e
commit 09ce403b2d

View file

@ -574,6 +574,7 @@ radv_descriptor_set_create(struct radv_device *device,
set = (struct radv_descriptor_set*)pool->host_memory_ptr;
pool->host_memory_ptr += mem_size;
memset(set->descriptors, 0, sizeof(struct radeon_winsys_bo *) * buffer_count);
} else {
set = vk_alloc2(&device->vk.alloc, NULL, mem_size, 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);