diff --git a/src/venus/vkr_command_buffer.c b/src/venus/vkr_command_buffer.c index acc7127..e4dde65 100644 --- a/src/venus/vkr_command_buffer.c +++ b/src/venus/vkr_command_buffer.c @@ -64,9 +64,10 @@ vkr_dispatch_vkFreeCommandBuffers(struct vn_dispatch_context *dispatch, struct vn_command_vkFreeCommandBuffers *args) { struct vkr_context *ctx = dispatch->data; + struct list_head free_list; - FREE_POOL_OBJECTS(command_buffer, COMMAND_BUFFER, vkFreeCommandBuffers, - pCommandBuffers, commandBufferCount, commandPool); + vkr_command_buffer_destroy_driver_handles(ctx, args, &free_list); + vkr_context_remove_objects(ctx, &free_list); } static void diff --git a/src/venus/vkr_common.h b/src/venus/vkr_common.h index d25b9e4..16a1e04 100644 --- a/src/venus/vkr_common.h +++ b/src/venus/vkr_common.h @@ -102,14 +102,6 @@ vkr_##vkr_type##_add_array(ctx, dev, pool, &arr); \ } while (0) -#define FREE_POOL_OBJECTS(vkr_type, vk_type, vk_cmd, arg_obj, arg_count, arg_pool) \ - do { \ - struct list_head free_list; \ - vkr_##vkr_type##_destroy_driver_handles(ctx, args, &free_list); \ - \ - vkr_context_remove_objects(ctx, &free_list); \ - } while (0) - struct vkr_context; struct vkr_instance; struct vkr_physical_device; diff --git a/src/venus/vkr_descriptor_set.c b/src/venus/vkr_descriptor_set.c index d372f2b..59e2f9a 100644 --- a/src/venus/vkr_descriptor_set.c +++ b/src/venus/vkr_descriptor_set.c @@ -105,9 +105,10 @@ vkr_dispatch_vkFreeDescriptorSets(struct vn_dispatch_context *dispatch, struct vn_command_vkFreeDescriptorSets *args) { struct vkr_context *ctx = dispatch->data; + struct list_head free_list; - FREE_POOL_OBJECTS(descriptor_set, DESCRIPTOR_SET, vkFreeDescriptorSets, - pDescriptorSets, descriptorSetCount, descriptorPool); + vkr_descriptor_set_destroy_driver_handles(ctx, args, &free_list); + vkr_context_remove_objects(ctx, &free_list); args->ret = VK_SUCCESS; }