diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2020-07-10 05:36:38 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2020-07-17 06:24:57 +0200 |
commit | 468bd9c1b0f9e74f7c096b127a94a94e4ed7caec (patch) | |
tree | 50a0f28b7c817222247369400bedf5de1ccc4e19 /src/video_core/shader_notify.h | |
parent | Merge pull request #4347 from lioncash/logging (diff) | |
download | yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.gz yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.bz2 yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.lz yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.xz yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.tar.zst yuzu-468bd9c1b0f9e74f7c096b127a94a94e4ed7caec.zip |
Diffstat (limited to 'src/video_core/shader_notify.h')
-rw-r--r-- | src/video_core/shader_notify.h | 29 |
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 @@ +// Copyright 2020 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <chrono> +#include <shared_mutex> +#include "common/common_types.h" + +namespace VideoCore { +class ShaderNotify { +public: + ShaderNotify(); + ~ShaderNotify(); + + std::size_t GetShadersBuilding(); + std::size_t GetShadersBuildingAccurate(); + + void MarkShaderComplete(); + void MarkSharderBuilding(); + +private: + std::size_t last_updated_count{}; + std::size_t accurate_count{}; + std::shared_mutex mutex; + std::chrono::high_resolution_clock::time_point last_update{}; +}; +} // namespace VideoCore |