diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-11 22:59:44 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-14 21:38:27 +0100 |
commit | bcd348f2388cf944f2ac49364a8d13b47cc21456 (patch) | |
tree | 7aefb0077b4d8902bdab3f3026361173a71046e3 /src/video_core/renderer_vulkan/vk_scheduler.cpp | |
parent | query_cache: Abstract OpenGL implementation (diff) | |
download | yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.tar yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.tar.gz yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.tar.bz2 yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.tar.lz yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.tar.xz yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.tar.zst yuzu-bcd348f2388cf944f2ac49364a8d13b47cc21456.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_scheduler.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index d66133ad1..92bd6c344 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -6,6 +6,7 @@ #include "common/microprofile.h" #include "video_core/renderer_vulkan/declarations.h" #include "video_core/renderer_vulkan/vk_device.h" +#include "video_core/renderer_vulkan/vk_query_cache.h" #include "video_core/renderer_vulkan/vk_resource_manager.h" #include "video_core/renderer_vulkan/vk_scheduler.h" @@ -139,6 +140,8 @@ void VKScheduler::SubmitExecution(vk::Semaphore semaphore) { } void VKScheduler::AllocateNewContext() { + ++ticks; + std::unique_lock lock{mutex}; current_fence = next_fence; next_fence = &resource_manager.CommitFence(); @@ -146,6 +149,10 @@ void VKScheduler::AllocateNewContext() { current_cmdbuf = resource_manager.CommitCommandBuffer(*current_fence); current_cmdbuf.begin({vk::CommandBufferUsageFlagBits::eOneTimeSubmit}, device.GetDispatchLoader()); + // Enable counters once again. These are disabled when a command buffer is finished. + if (query_cache) { + query_cache->UpdateCounters(); + } } void VKScheduler::InvalidateState() { @@ -159,6 +166,7 @@ void VKScheduler::InvalidateState() { } void VKScheduler::EndPendingOperations() { + query_cache->DisableStreams(); EndRenderPass(); } |