radv: fix regression in descriptor set freeing.
authorDave Airlie <airlied@redhat.com>
Wed, 26 Apr 2017 23:31:29 +0000 (09:31 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 27 Apr 2017 00:50:46 +0000 (10:50 +1000)
Since the host pool changes,

Fixes:
dEQP-VK.api.descriptor_pool.out_of_pool_memory

Fixes: 126d5ad "radv: Use host memory pool for non-freeable descriptors."
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_descriptor_set.c

index b608063d0706afe533cacb493738dc5322a220fe..ec7fd3d8cc80c48651a0558383689beadd4872c0 100644 (file)
@@ -527,7 +527,7 @@ VkResult radv_FreeDescriptorSets(
        for (uint32_t i = 0; i < count; i++) {
                RADV_FROM_HANDLE(radv_descriptor_set, set, pDescriptorSets[i]);
 
-               if (set)
+               if (set && !pool->host_memory_base)
                        radv_descriptor_set_destroy(device, pool, set, true);
        }
        return VK_SUCCESS;