yuzu/src/video_core/shader_notify.h

32 lines
649 B
C++
Raw Normal View History

// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2020-07-10 05:36:38 +02:00
#pragma once
#include <atomic>
2020-07-10 05:36:38 +02:00
#include <chrono>
namespace VideoCore {
class ShaderNotify {
public:
[[nodiscard]] int ShadersBuilding() noexcept;
2020-07-10 05:36:38 +02:00
void MarkShaderComplete() noexcept {
++num_complete;
}
2020-07-10 05:36:38 +02:00
void MarkShaderBuilding() noexcept {
++num_building;
}
2020-07-10 05:36:38 +02:00
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;
2020-07-10 05:36:38 +02:00
};
} // namespace VideoCore