From d853aba95555c2df5c9a7fd02f791a2ca902d0ed Mon Sep 17 00:00:00 2001 From: nmzik Date: Tue, 8 Sep 2026 13:05:29 +0400 Subject: [PATCH] graphics: skip temporary cache lookup vectors --- src/graphics/host_gpu/renderer/cache/bufferCache.cpp | 4 ++-- src/graphics/host_gpu/renderer/cache/textureCache.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/host_gpu/renderer/cache/bufferCache.cpp b/src/graphics/host_gpu/renderer/cache/bufferCache.cpp index f7c493683..04a56ee18 100644 --- a/src/graphics/host_gpu/renderer/cache/bufferCache.cpp +++ b/src/graphics/host_gpu/renderer/cache/bufferCache.cpp @@ -277,10 +277,10 @@ void BufferCache::ReadMemoryOnGpu(uint64_t vaddr, uint64_t size, bool is_write) "memory invalidation"); }, [&](uint64_t address, uint64_t bytes) noexcept { - for (const auto range: m_gpu_modified_ranges.Intersections(address, bytes)) { + m_gpu_modified_ranges.ForEachIntersection(address, bytes, [&](RangeSet::Range range) { copies.push_back( {&buffer, buffer.Offset(range.address), range.address, range.size}); - } + }); }); if (!copies.empty()) { DownloadBufferMemory(copies); diff --git a/src/graphics/host_gpu/renderer/cache/textureCache.cpp b/src/graphics/host_gpu/renderer/cache/textureCache.cpp index c5c5cd043..76154e237 100644 --- a/src/graphics/host_gpu/renderer/cache/textureCache.cpp +++ b/src/graphics/host_gpu/renderer/cache/textureCache.cpp @@ -1334,8 +1334,8 @@ ImageId TextureCache::FindImageFromRange(uint64_t address, uint64_t size, bool e if (!GuestRange {address, size}.Valid()) { return {}; } - std::scoped_lock lock {m_lock}; - std::vector matches; + std::scoped_lock lock {m_lock}; + ImageIds matches; for (const auto id: FindImagesInRegion(address, size, false)) { auto owner = m_slot_images.try_get(id); if (owner == nullptr || owner->info.data.address != address) {