This is weird. When a mem block is zonbiefied, its cpu memory allocation is already gone. This can cause issues when we want to later use it in destruction of memory block suballocated resources.
| 620 | // When a mem block is zonbiefied, its cpu memory allocation is already gone. |
| 621 | // This can cause issues when we want to later use it in destruction of memory block suballocated resources. |
| 622 | void daxa_ImplMemoryBlock::zero_ref_callback(ImplHandle const * handle) |
| 623 | { |
| 624 | auto const * self = r_cast<daxa_ImplMemoryBlock const*>(handle); |
| 625 | std::unique_lock const lock{self->device->zombies_mtx}; |
| 626 | u64 const submit_timeline_value = self->device->global_submit_timeline.load(std::memory_order::relaxed); |
| 627 | self->device->memory_block_zombies.emplace_front( |
| 628 | submit_timeline_value, |
| 629 | MemoryBlockZombie{ |
| 630 | .allocation = self->allocation, |
| 631 | }); |
| 632 | self->device->dec_weak_refcnt( |
| 633 | daxa_ImplDevice::zero_ref_callback, |
| 634 | self->device->instance); |
| 635 | delete self; |
| 636 | } |
| 637 | |
| 638 | // --- End daxa_ImplMemoryBlock --- |
nothing calls this directly
no outgoing calls
no test coverage detected