mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-21 10:18:56 +02:00
HACK: Avoid swizzling and reuploading ASTC image every frame
This commit is contained in:
parent
913803bf65
commit
b18c1fb1bb
5 changed files with 39 additions and 4 deletions
|
|
@ -214,6 +214,7 @@ StagingBufferPool::StagingBuffersCache& StagingBufferPool::GetCache(MemoryUsage
|
|||
}
|
||||
|
||||
void StagingBufferPool::ReleaseCache(MemoryUsage usage) {
|
||||
return;
|
||||
ReleaseLevel(GetCache(usage), current_delete_level);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -846,7 +846,15 @@ void TextureCacheRuntime::Finish() {
|
|||
}
|
||||
|
||||
StagingBufferRef TextureCacheRuntime::UploadStagingBuffer(size_t size) {
|
||||
return staging_buffer_pool.Request(size, MemoryUsage::Upload);
|
||||
static StagingBufferRef result;
|
||||
static size_t last_size = 0;
|
||||
if (size == last_size) {
|
||||
return result;
|
||||
}
|
||||
LOG_ERROR(Debug, "Called");
|
||||
last_size = size;
|
||||
result = staging_buffer_pool.Request(size, MemoryUsage::Upload);
|
||||
return result;
|
||||
}
|
||||
|
||||
StagingBufferRef TextureCacheRuntime::DownloadStagingBuffer(size_t size, bool deferred) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue