summaryrefslogtreecommitdiffstats
path: root/src/video_core/query_cache.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-06 01:26:15 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-06 15:23:08 +0200
commitf9d5718c4b223c35b8ccd136700e14cb6751078a (patch)
tree34da40f2bcc237a40d178711f615b77079cf18a4 /src/video_core/query_cache.h
parentShader/Pipeline Cache: Use VAddr instead of physical memory for addressing. (diff)
downloadyuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.tar
yuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.tar.gz
yuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.tar.bz2
yuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.tar.lz
yuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.tar.xz
yuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.tar.zst
yuzu-f9d5718c4b223c35b8ccd136700e14cb6751078a.zip
Diffstat (limited to 'src/video_core/query_cache.h')
-rw-r--r--src/video_core/query_cache.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h
index 84cbe93f6..5ea2b01f2 100644
--- a/src/video_core/query_cache.h
+++ b/src/video_core/query_cache.h
@@ -117,12 +117,10 @@ public:
void Query(GPUVAddr gpu_addr, VideoCore::QueryType type, std::optional<u64> timestamp) {
std::unique_lock lock{mutex};
auto& memory_manager = system.GPU().MemoryManager();
- const std::optional<VAddr> cpu_addr_opt =
- memory_manager.GpuToCpuAddress(gpu_addr);
+ const std::optional<VAddr> cpu_addr_opt = memory_manager.GpuToCpuAddress(gpu_addr);
ASSERT(cpu_addr_opt);
VAddr cpu_addr = *cpu_addr_opt;
-
CachedQuery* query = TryGet(cpu_addr);
if (!query) {
ASSERT_OR_EXECUTE(cpu_addr_opt, return;);
@@ -221,9 +219,8 @@ private:
return nullptr;
}
auto& contents = it->second;
- const auto found =
- std::find_if(std::begin(contents), std::end(contents),
- [addr](auto& query) { return query.GetCpuAddr() == addr; });
+ const auto found = std::find_if(std::begin(contents), std::end(contents),
+ [addr](auto& query) { return query.GetCpuAddr() == addr; });
return found != std::end(contents) ? &*found : nullptr;
}