diff options
| author | 2020-02-13 15:31:37 -0300 | |
|---|---|---|
| committer | 2020-02-14 17:38:27 -0300 | |
| commit | 54a00ee4cfdc9f9cd0985d10c4f3a822a284d997 (patch) | |
| tree | 1fa4b46a036ce2a23ac1afff50427099f0f087cc | |
| parent | query_cache: Add a recursive mutex for concurrent usage (diff) | |
| download | yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.gz yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.tar.xz yuzu-54a00ee4cfdc9f9cd0985d10c4f3a822a284d997.zip | |
query_cache: Fix ambiguity in CacheAddr getter
| -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: | |||
| 172 | const u64 addr_begin = static_cast<u64>(addr); | 172 | const u64 addr_begin = static_cast<u64>(addr); |
| 173 | const u64 addr_end = addr_begin + static_cast<u64>(size); | 173 | const u64 addr_end = addr_begin + static_cast<u64>(size); |
| 174 | const auto in_range = [addr_begin, addr_end](CachedQuery& query) { | 174 | const auto in_range = [addr_begin, addr_end](CachedQuery& query) { |
| 175 | const u64 cache_begin = query.CacheAddr(); | 175 | const u64 cache_begin = query.GetCacheAddr(); |
| 176 | const u64 cache_end = cache_begin + query.SizeInBytes(); | 176 | const u64 cache_end = cache_begin + query.SizeInBytes(); |
| 177 | return cache_begin < addr_end && addr_begin < cache_end; | 177 | return cache_begin < addr_end && addr_begin < cache_end; |
| 178 | }; | 178 | }; |
| @@ -212,8 +212,9 @@ private: | |||
| 212 | return nullptr; | 212 | return nullptr; |
| 213 | } | 213 | } |
| 214 | auto& contents = it->second; | 214 | auto& contents = it->second; |
| 215 | const auto found = std::find_if(std::begin(contents), std::end(contents), | 215 | const auto found = |
| 216 | [addr](auto& query) { return query.CacheAddr() == addr; }); | 216 | std::find_if(std::begin(contents), std::end(contents), |
| 217 | [addr](auto& query) { return query.GetCacheAddr() == addr; }); | ||
| 217 | return found != std::end(contents) ? &*found : nullptr; | 218 | return found != std::end(contents) ? &*found : nullptr; |
| 218 | } | 219 | } |
| 219 | 220 | ||
| @@ -326,7 +327,7 @@ public: | |||
| 326 | return cpu_addr; | 327 | return cpu_addr; |
| 327 | } | 328 | } |
| 328 | 329 | ||
| 329 | CacheAddr CacheAddr() const noexcept { | 330 | CacheAddr GetCacheAddr() const noexcept { |
| 330 | return ToCacheAddr(host_ptr); | 331 | return ToCacheAddr(host_ptr); |
| 331 | } | 332 | } |
| 332 | 333 | ||