2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00
yuzu/src/video_core/shader_notify.h

30 lines
665 B
C++
Raw Normal View History

2020-07-10 04:36:38 +01:00
// 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