diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-13 19:31:37 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-14 21:38:27 +0100 |
commit | 54a00ee4cfdc9f9cd0985d10c4f3a822a284d997 (patch) | |
tree | 1fa4b46a036ce2a23ac1afff50427099f0f087cc | |
parent | query_cache: Add a recursive mutex for concurrent usage (diff) | |
download | yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.gz yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.bz2 yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.lz yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.xz yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.zst yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.zip |
-rw-r--r-- | src/video_core/query_cache.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index 86f5aade1..a040858e8 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h @@ -172,7 +172,7 @@ private: const u64 addr_begin = static_cast<u64>(addr); const u64 addr_end = addr_begin + static_cast<u64>(size); const auto in_range = [addr_begin, addr_end](CachedQuery& query) { - const u64 cache_begin = query.CacheAddr(); + const u64 cache_begin = query.GetCacheAddr(); const u64 cache_end = cache_begin + query.SizeInBytes(); return cache_begin < addr_end && addr_begin < cache_end; }; @@ -212,8 +212,9 @@ private: return nullptr; } auto& contents = it->second; - const auto found = std::find_if(std::begin(contents), std::end(contents), - [addr](auto& query) { return query.CacheAddr() == addr; }); + const auto found = + std::find_if(std::begin(contents), std::end(contents), + [addr](auto& query) { return query.GetCacheAddr() == addr; }); return found != std::end(contents) ? &*found : nullptr; } @@ -326,7 +327,7 @@ public: return cpu_addr; } - CacheAddr CacheAddr() const noexcept { + CacheAddr GetCacheAddr() const noexcept { return ToCacheAddr(host_ptr); } |