mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-18 04:42:45 +01:00
99ceb03a1c
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
31 lines
649 B
C++
31 lines
649 B
C++
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <atomic>
|
|
#include <chrono>
|
|
|
|
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
|