From e2488329675d1654ded119ae9ddc5a32cde23b46 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Mon, 27 Jul 2026 23:49:20 -0400 Subject: [PATCH] Fix build --- src/video_core/buffer_cache/buffer_cache.h | 2 +- src/video_core/texture_cache/texture_cache.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index c638d8b715..986630cd58 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -1641,7 +1641,7 @@ void BufferCache

::ChangeRegister(BufferId buffer_id) { total_used_memory += Common::AlignUp(size, 1024); buffer.setLRUID(lru_cache.Insert(buffer_id, frame_tick)); } else { - total_used_memory -= (std::min)(total_used_memory, Common::AlignUp(size, 1024)); + total_used_memory -= std::min(total_used_memory, Common::AlignUp(size, 1024)); lru_cache.Free(buffer.getLRUID()); } const DAddr device_addr_begin = buffer.CpuAddr(); diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index c273d576a6..d6a4c00e53 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -184,11 +184,15 @@ u64 TextureCache

::ReclaimMemory(u64 target_bytes, bool allow_download) { image.IsSafeDownload() && False(image.flags & ImageFlagBits::BadOverlap); bool queued_download = false; if (must_download) { - if (!allow_download || !HAS_TIMELINE_SYNC_POINTS) { + if constexpr (HAS_TIMELINE_SYNC_POINTS) { + if (!allow_download) { + return false; + } + QueueEvictionDownload(image); + queued_download = true; + } else { return false; } - QueueEvictionDownload(image); - queued_download = true; } const u64 image_bytes = ImageSizeBytes(image); if (True(image.flags & ImageFlagBits::Tracked)) { @@ -2408,7 +2412,7 @@ void TextureCache

::UntrackImage(ImageBase& image, ImageId image_id) { template void TextureCache

::DeleteImage(ImageId image_id, bool immediate_delete) { ImageBase& image = slot_images[image_id]; - total_used_memory -= (std::min)(total_used_memory, ImageSizeBytes(image)); + total_used_memory -= std::min(total_used_memory, ImageSizeBytes(image)); const GPUVAddr gpu_addr = image.gpu_addr; const auto alloc_it = image_allocs_table.find(gpu_addr); if (alloc_it == image_allocs_table.end()) {