1
0
Fork 0
forked from suyu/suyu
suyu/src/video_core/shader_notify.h
Morph 762b8ad448 general: Replace high_resolution_clock with steady_clock
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-12-02 14:20:43 -05:00

33 lines
688 B
C++

// Copyright 2020 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <atomic>
#include <chrono>
#include <optional>
namespace VideoCore {
class ShaderNotify {
public:
[[nodiscard]] int ShadersBuilding() noexcept;
void MarkShaderComplete() noexcept {
++num_complete;
}
void MarkShaderBuilding() noexcept {
++num_building;
}
private:
std::atomic_int num_building{};
std::atomic_int num_complete{};
int report_base{};
bool completed{};
int num_when_completed{};
std::chrono::steady_clock::time_point complete_time;
};
} // namespace VideoCore