summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_query_cache.cpp
diff options
context:
space:
mode:
authorChloe <25727384+ogniK5377@users.noreply.github.com>2020-12-05 13:45:00 +0100
committerGitHub <noreply@github.com>2020-12-05 13:45:00 +0100
commitf2f346e1104106eb9323f0e141e0e67312c29849 (patch)
tree6eac8e13f3333c89d8c0f3428b8664cab63a484a /src/video_core/renderer_vulkan/vk_query_cache.cpp
parentMerge pull request #5124 from lioncash/video-shadow (diff)
parentvideo_core: Resolve more variable shadowing scenarios pt.2 (diff)
downloadyuzu-f2f346e1104106eb9323f0e141e0e67312c29849.tar
yuzu-f2f346e1104106eb9323f0e141e0e67312c29849.tar.gz
yuzu-f2f346e1104106eb9323f0e141e0e67312c29849.tar.bz2
yuzu-f2f346e1104106eb9323f0e141e0e67312c29849.tar.lz
yuzu-f2f346e1104106eb9323f0e141e0e67312c29849.tar.xz
yuzu-f2f346e1104106eb9323f0e141e0e67312c29849.tar.zst
yuzu-f2f346e1104106eb9323f0e141e0e67312c29849.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_query_cache.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp
index ee2d871e3..6fa071737 100644
--- a/src/video_core/renderer_vulkan/vk_query_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp
@@ -66,15 +66,15 @@ void QueryPool::Reserve(std::pair<VkQueryPool, u32> query) {
usage[pool_index * GROW_STEP + static_cast<std::ptrdiff_t>(query.second)] = false;
}
-VKQueryCache::VKQueryCache(VideoCore::RasterizerInterface& rasterizer,
- Tegra::Engines::Maxwell3D& maxwell3d, Tegra::MemoryManager& gpu_memory,
- const VKDevice& device, VKScheduler& scheduler)
- : VideoCommon::QueryCacheBase<VKQueryCache, CachedQuery, CounterStream,
- HostCounter>{rasterizer, maxwell3d, gpu_memory},
- device{device}, scheduler{scheduler}, query_pools{
- QueryPool{device, scheduler,
- QueryType::SamplesPassed},
- } {}
+VKQueryCache::VKQueryCache(VideoCore::RasterizerInterface& rasterizer_,
+ Tegra::Engines::Maxwell3D& maxwell3d_, Tegra::MemoryManager& gpu_memory_,
+ const VKDevice& device_, VKScheduler& scheduler_)
+ : QueryCacheBase<VKQueryCache, CachedQuery, CounterStream, HostCounter>{rasterizer_, maxwell3d_,
+ gpu_memory_},
+ device{device_}, scheduler{scheduler_}, query_pools{
+ QueryPool{device_, scheduler_,
+ QueryType::SamplesPassed},
+ } {}
VKQueryCache::~VKQueryCache() {
// TODO(Rodrigo): This is a hack to destroy all HostCounter instances before the base class
@@ -95,12 +95,12 @@ void VKQueryCache::Reserve(QueryType type, std::pair<VkQueryPool, u32> query) {
query_pools[static_cast<std::size_t>(type)].Reserve(query);
}
-HostCounter::HostCounter(VKQueryCache& cache, std::shared_ptr<HostCounter> dependency,
- QueryType type)
- : VideoCommon::HostCounterBase<VKQueryCache, HostCounter>{std::move(dependency)}, cache{cache},
- type{type}, query{cache.AllocateQuery(type)}, tick{cache.Scheduler().CurrentTick()} {
- const vk::Device* logical = &cache.Device().GetLogical();
- cache.Scheduler().Record([logical, query = query](vk::CommandBuffer cmdbuf) {
+HostCounter::HostCounter(VKQueryCache& cache_, std::shared_ptr<HostCounter> dependency_,
+ QueryType type_)
+ : HostCounterBase<VKQueryCache, HostCounter>{std::move(dependency_)}, cache{cache_},
+ type{type_}, query{cache_.AllocateQuery(type_)}, tick{cache_.Scheduler().CurrentTick()} {
+ const vk::Device* logical = &cache_.Device().GetLogical();
+ cache_.Scheduler().Record([logical, query = query](vk::CommandBuffer cmdbuf) {
logical->ResetQueryPoolEXT(query.first, query.second, 1);
cmdbuf.BeginQuery(query.first, query.second, VK_QUERY_CONTROL_PRECISE_BIT);
});