summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_query_cache.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-05 09:48:08 +0100
committerGitHub <noreply@github.com>2020-12-05 09:48:08 +0100
commite6a896c4bdf9cc47c2002c115c9ff280e540fd1b (patch)
treee5cd397cb3a11f1529f38ed8fa0a0185d07becaa /src/video_core/renderer_opengl/gl_query_cache.cpp
parentMerge pull request #5127 from FearlessTobi/port-5617 (diff)
parentvideo_core: Resolve more variable shadowing scenarios (diff)
downloadyuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar
yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.gz
yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.bz2
yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.lz
yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.xz
yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.zst
yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_query_cache.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_query_cache.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_query_cache.cpp b/src/video_core/renderer_opengl/gl_query_cache.cpp
index 1a3d9720e..bcc37471f 100644
--- a/src/video_core/renderer_opengl/gl_query_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_query_cache.cpp
@@ -59,10 +59,10 @@ bool QueryCache::AnyCommandQueued() const noexcept {
return gl_rasterizer.AnyCommandQueued();
}
-HostCounter::HostCounter(QueryCache& cache, std::shared_ptr<HostCounter> dependency,
- VideoCore::QueryType type)
- : VideoCommon::HostCounterBase<QueryCache, HostCounter>{std::move(dependency)}, cache{cache},
- type{type}, query{cache.AllocateQuery(type)} {
+HostCounter::HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency,
+ VideoCore::QueryType type_)
+ : HostCounterBase<QueryCache, HostCounter>{std::move(dependency)}, cache{cache_}, type{type_},
+ query{cache.AllocateQuery(type)} {
glBeginQuery(GetTarget(type), query.handle);
}
@@ -86,13 +86,14 @@ u64 HostCounter::BlockingQuery() const {
return static_cast<u64>(value);
}
-CachedQuery::CachedQuery(QueryCache& cache, VideoCore::QueryType type, VAddr cpu_addr, u8* host_ptr)
- : VideoCommon::CachedQueryBase<HostCounter>{cpu_addr, host_ptr}, cache{&cache}, type{type} {}
+CachedQuery::CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr,
+ u8* host_ptr)
+ : CachedQueryBase<HostCounter>{cpu_addr, host_ptr}, cache{&cache_}, type{type_} {}
CachedQuery::~CachedQuery() = default;
CachedQuery::CachedQuery(CachedQuery&& rhs) noexcept
- : VideoCommon::CachedQueryBase<HostCounter>(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {}
+ : CachedQueryBase<HostCounter>(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {}
CachedQuery& CachedQuery::operator=(CachedQuery&& rhs) noexcept {
cache = rhs.cache;