diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-12-31 08:07:59 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-12-31 23:04:02 +0100 |
commit | 285b6dbc3932be87abfb7b044a083186152d1cac (patch) | |
tree | 38cc972b87093beace828275386a829fbcb886a2 /src/video_core/texture_cache | |
parent | video_core/memory_manager: Deduplicate Read/WriteBlock (diff) | |
download | yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.tar yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.tar.gz yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.tar.bz2 yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.tar.lz yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.tar.xz yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.tar.zst yuzu-285b6dbc3932be87abfb7b044a083186152d1cac.zip |
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index b494152b8..198bb0cfb 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1376,9 +1376,7 @@ void TextureCache<P>::ForEachSparseSegment(ImageBase& image, Func&& func) { using FuncReturn = typename std::invoke_result<Func, GPUVAddr, VAddr, size_t>::type; static constexpr bool RETURNS_BOOL = std::is_same_v<FuncReturn, bool>; const auto segments = gpu_memory.GetSubmappedRange(image.gpu_addr, image.guest_size_bytes); - for (auto& segment : segments) { - const auto gpu_addr = segment.first; - const auto size = segment.second; + for (const auto& [gpu_addr, size] : segments) { std::optional<VAddr> cpu_addr = gpu_memory.GpuToCpuAddress(gpu_addr); ASSERT(cpu_addr); if constexpr (RETURNS_BOOL) { |