summaryrefslogtreecommitdiff
path: root/src/video_core/shader_notify.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/shader_notify.h')
-rw-r--r--src/video_core/shader_notify.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/video_core/shader_notify.h b/src/video_core/shader_notify.h
index a9c92d179..ad363bfb5 100644
--- a/src/video_core/shader_notify.h
+++ b/src/video_core/shader_notify.h
@@ -4,26 +4,30 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <atomic>
7#include <chrono> 8#include <chrono>
8#include <shared_mutex> 9#include <optional>
9#include "common/common_types.h"
10 10
11namespace VideoCore { 11namespace VideoCore {
12class ShaderNotify { 12class ShaderNotify {
13public: 13public:
14 ShaderNotify(); 14 [[nodiscard]] int ShadersBuilding() noexcept;
15 ~ShaderNotify();
16 15
17 std::size_t GetShadersBuilding(); 16 void MarkShaderComplete() noexcept {
18 std::size_t GetShadersBuildingAccurate(); 17 ++num_complete;
18 }
19 19
20 void MarkShaderComplete(); 20 void MarkShaderBuilding() noexcept {
21 void MarkSharderBuilding(); 21 ++num_building;
22 }
22 23
23private: 24private:
24 std::size_t last_updated_count{}; 25 std::atomic_int num_building{};
25 std::size_t accurate_count{}; 26 std::atomic_int num_complete{};
26 std::shared_mutex mutex; 27 int report_base{};
27 std::chrono::high_resolution_clock::time_point last_update{}; 28
29 bool completed{};
30 int num_when_completed{};
31 std::chrono::high_resolution_clock::time_point complete_time;
28}; 32};
29} // namespace VideoCore 33} // namespace VideoCore