30 this->append(std::pair(timeline, item));
35 for (std::pair<TimelineValue, Item> &pair : *
this) {
36 pair.first = timeline;
54 int64_t first_index_to_keep = 0;
55 for (std::pair<TimelineValue, Item> &item : *
this) {
56 if (item.first > current_timeline) {
60 first_index_to_keep++;
63 if (first_index_to_keep > 0) {
64 this->remove(0, first_index_to_keep);
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_swapchain_image(ResourceHandle image_handle)
void discard_image_view(VkImageView vk_image_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_resources(Span< render_graph::VKResourceStateTracker::DiscardableResource > discardable, TimelineValue timeline)
void deinit(VKDevice &device)
void discard_allocation(VmaAllocation vma_allocation)
void discard_pipeline(VkPipeline vk_pipeline)
void discard_pipeline_layout(VkPipelineLayout vk_pipeline_layout)
void destroy_discarded_resources(VKDevice &device, TimelineValue current_timeline)
void discard_acceleration_structure(VkAccelerationStructureKHR vk_acceleration_structure)
PruningStream & operator<<(PruningStream &dst, const TokenStream &src)