summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-12-31 08:07:59 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-12-31 23:04:02 +0100
commit285b6dbc3932be87abfb7b044a083186152d1cac (patch)
tree38cc972b87093beace828275386a829fbcb886a2 /src/video_core/texture_cache
parentvideo_core/memory_manager: Deduplicate Read/WriteBlock (diff)
downloadyuzu-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.h4
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) {