| 2920 | } |
| 2921 | |
| 2922 | void daxa_ImplDevice::zero_ref_callback(ImplHandle const * handle) |
| 2923 | { |
| 2924 | auto self = rc_cast<daxa_Device>(handle); |
| 2925 | auto result = daxa_dvc_wait_idle(self); |
| 2926 | DAXA_DBG_ASSERT_TRUE_M(result == DAXA_RESULT_SUCCESS, "failed to wait idle"); |
| 2927 | result = daxa_dvc_collect_garbage(self); |
| 2928 | DAXA_DBG_ASSERT_TRUE_M(result == DAXA_RESULT_SUCCESS, "failed to wait idle"); |
| 2929 | self->commands.cleanup(self->vk_device); |
| 2930 | vmaDestroyBuffer(self->vma_allocator, self->buffer_device_address_buffer, self->buffer_device_address_buffer_allocation); |
| 2931 | self->gpu_sro_table.cleanup(self->vk_device); |
| 2932 | vmaDestroyImage(self->vma_allocator, self->vk_null_image, self->vk_null_image_vma_allocation); |
| 2933 | vmaDestroyBuffer(self->vma_allocator, self->vk_null_buffer, self->vk_null_buffer_vma_allocation); |
| 2934 | vmaDestroyAllocator(self->vma_allocator); |
| 2935 | vkDestroySampler(self->vk_device, self->vk_null_sampler, nullptr); |
| 2936 | vkDestroyImageView(self->vk_device, self->vk_null_image_view, nullptr); |
| 2937 | for (auto & queue : self->queues) |
| 2938 | { |
| 2939 | queue.cleanup(self->vk_device); |
| 2940 | } |
| 2941 | vkDestroyDevice(self->vk_device, nullptr); |
| 2942 | self->instance->dec_weak_refcnt( |
| 2943 | daxa_ImplInstance::zero_ref_callback, |
| 2944 | self->instance); |
| 2945 | delete self; |
| 2946 | } |
| 2947 | |
| 2948 | template <typename T> |
| 2949 | void zombiefy(daxa_Device self, T id, auto & slots, auto & zombies) |
nothing calls this directly
no test coverage detected