mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-13 19:57:51 +00:00
async shaders
This commit is contained in:
parent
6825b4911d
commit
a4e811af27
16 changed files with 598 additions and 64 deletions
29
src/video_core/shader_notify.h
Normal file
29
src/video_core/shader_notify.h
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue