28 this->
append(std::pair(timeline, item));
33 for (std::pair<TimelineValue, Item> &pair : *
this) {
34 pair.first = timeline;
52 int64_t first_index_to_keep = 0;
53 for (std::pair<TimelineValue, Item> &item : *
this) {
54 if (item.first > current_timeline) {
58 first_index_to_keep++;
61 if (first_index_to_keep > 0) {
62 this->
remove(0, first_index_to_keep);
98 void discard_image(VkImage vk_image, VmaAllocation vma_allocation);
100 void discard_buffer(VkBuffer vk_buffer, VmaAllocation vma_allocation);
void append(const std::pair< TimelineValue, Item > &value)
void remove(const int64_t index)
friend class VKDiscardPool
void update_timeline(TimelineValue timeline)
void remove_old(TimelineValue current_timeline, Deleter deleter)
void append_timeline(TimelineValue timeline, Item item)
void discard_image_view(VkImageView vk_image_view)
void discard_buffer_view(VkBufferView vk_buffer_view)
void move_data(VKDiscardPool &src_pool, TimelineValue timeline)
void discard_descriptor_pool_for_reuse(VkDescriptorPool vk_descriptor_pool, VKDescriptorPools *descriptor_pools)
static VKDiscardPool & discard_pool_get()
void discard_shader_module(VkShaderModule vk_shader_module)
void discard_image(VkImage vk_image, VmaAllocation vma_allocation)
void discard_buffer(VkBuffer vk_buffer, VmaAllocation vma_allocation)
void deinit(VKDevice &device)
void discard_pipeline(VkPipeline vk_pipeline)
void discard_pipeline_layout(VkPipelineLayout vk_pipeline_layout)
void destroy_discarded_resources(VKDevice &device, TimelineValue current_timeline)