summaryrefslogtreecommitdiff
path: root/src/video_core/shader_notify.h
diff options
context:
space:
mode:
authorGravatar David Marcec2020-07-10 13:36:38 +1000
committerGravatar David Marcec2020-07-17 14:24:57 +1000
commit468bd9c1b0f9e74f7c096b127a94a94e4ed7caec (patch)
tree50a0f28b7c817222247369400bedf5de1ccc4e19 /src/video_core/shader_notify.h
parentMerge pull request #4347 from lioncash/logging (diff)
downloadyuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.gz
yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.xz
yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.zip
async shaders
Diffstat (limited to 'src/video_core/shader_notify.h')
-rw-r--r--src/video_core/shader_notify.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/video_core/shader_notify.h b/src/video_core/shader_notify.h
new file mode 100644
index 000000000..a9c92d179
--- /dev/null
+++ b/src/video_core/shader_notify.h
@@ -0,0 +1,29 @@
1// Copyright 2020 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <chrono>
8#include <shared_mutex>
9#include "common/common_types.h"
10
11namespace VideoCore {
12class ShaderNotify {
13public:
14 ShaderNotify();
15 ~ShaderNotify();
16
17 std::size_t GetShadersBuilding();
18 std::size_t GetShadersBuildingAccurate();
19
20 void MarkShaderComplete();
21 void MarkSharderBuilding();
22
23private:
24 std::size_t last_updated_count{};
25 std::size_t accurate_count{};
26 std::shared_mutex mutex;
27 std::chrono::high_resolution_clock::time_point last_update{};
28};
29} // namespace VideoCore