early-access version 3527

This commit is contained in:
pineappleEA
2023-04-24 01:59:22 +02:00
parent 4a571b3057
commit a6e49bc8f4
17 changed files with 299 additions and 100 deletions

View File

@@ -139,6 +139,13 @@ void TextureCache<P>::TickFrame() {
runtime.TickFrame();
critical_gc = 0;
++frame_tick;
if constexpr (IMPLEMENTS_ASYNC_DOWNLOADS) {
for (auto& buffer : async_buffers_death_ring) {
runtime.FreeDeferredStagingBuffer(buffer);
}
async_buffers_death_ring.clear();
}
}
template <class P>
@@ -688,10 +695,10 @@ void TextureCache<P>::CommitAsyncFlushes() {
}
uncommitted_async_buffers.emplace_back(download_map);
}
async_buffers.emplace_back(std::move(uncommitted_async_buffers));
uncommitted_async_buffers.clear();
}
committed_downloads.emplace_back(std::move(uncommitted_downloads));
async_buffers.emplace_back(std::move(uncommitted_async_buffers));
uncommitted_async_buffers.clear();
uncommitted_downloads.clear();
}
@@ -729,7 +736,7 @@ void TextureCache<P>::PopAsyncFlushes() {
}
}
for (auto& download_buffer : download_map) {
runtime.FreeDeferredStagingBuffer(download_buffer);
async_buffers_death_ring.emplace_back(download_buffer);
}
committed_downloads.pop_front();
async_buffers.pop_front();

View File

@@ -449,6 +449,7 @@ private:
std::deque<std::vector<PendingDownload>> committed_downloads;
std::vector<AsyncBuffer> uncommitted_async_buffers;
std::deque<std::vector<AsyncBuffer>> async_buffers;
std::deque<AsyncBuffer> async_buffers_death_ring;
struct LRUItemParams {
using ObjectType = ImageId;