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>
(cherry picked from commit 09ce403b2d)
This commit is contained in:
Mike Blumenkrantz 2021-02-03 07:17:17 -05:00 committed by Dylan Baker
parent bde380bde9
commit 0ea5fe87ae
2 changed files with 2 additions and 1 deletions

View file

@ -2119,7 +2119,7 @@
"description": "radv: zero the bo descriptor array when allocating a new set",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "126d5adb11e18a329e197db8f117b47bba30eeed"
},

View file

@ -577,6 +577,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);