From 0ea5fe87ae51dcc14e17daaee38e93726b431f8c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 3 Feb 2021 07:17:17 -0500 Subject: [PATCH] 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: 126d5adb11e ("radv: Use host memory pool for non-freeable descriptors.") Reviewed-by: Bas Nieuwenhuizen Part-of: (cherry picked from commit 09ce403b2d77ca80eade07562839103ed9b46f0b) --- .pick_status.json | 2 +- src/amd/vulkan/radv_descriptor_set.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index a0538caa412..dde154b422a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index 04d5cee7dd5..3868f49b294 100644 --- a/src/amd/vulkan/radv_descriptor_set.c +++ b/src/amd/vulkan/radv_descriptor_set.c @@ -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);