diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-06 05:35:57 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:35 +0200 |
commit | 12fe7210d2b546bd9c5825b6517b80efc818a7fe (patch) | |
tree | 135a6e6158b51b43c10a96fa834d39578956966f /src/video_core/renderer_opengl/gl_shader_cache.h | |
parent | vk_pipeline_cache,shader_notify: Add shader notifications (diff) | |
download | yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.tar yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.tar.gz yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.tar.bz2 yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.tar.lz yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.tar.xz yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.tar.zst yuzu-12fe7210d2b546bd9c5825b6517b80efc818a7fe.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h index cf74d34e4..e0c5a06d8 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_cache.h @@ -12,6 +12,7 @@ #include <glad/glad.h> #include "common/common_types.h" +#include "common/thread_worker.h" #include "shader_recompiler/frontend/ir/basic_block.h" #include "shader_recompiler/frontend/ir/value.h" #include "shader_recompiler/frontend/maxwell/control_flow.h" @@ -44,6 +45,8 @@ struct ShaderPools { }; class ShaderCache : public VideoCommon::ShaderCache { + struct Context; + public: explicit ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindow& emu_window_, Tegra::Engines::Maxwell3D& maxwell3d_, @@ -74,6 +77,8 @@ private: const ComputePipelineKey& key, Shader::Environment& env); + std::unique_ptr<Common::StatefulThreadWorker<Context>> CreateWorkers() const; + Core::Frontend::EmuWindow& emu_window; const Device& device; TextureCache& texture_cache; @@ -82,6 +87,7 @@ private: StateTracker& state_tracker; GraphicsPipelineKey graphics_key{}; + const bool use_asynchronous_shaders; ShaderPools main_pools; std::unordered_map<GraphicsPipelineKey, std::unique_ptr<GraphicsPipeline>> graphics_cache; @@ -89,6 +95,7 @@ private: Shader::Profile profile; std::filesystem::path shader_cache_filename; + std::unique_ptr<Common::StatefulThreadWorker<Context>> workers; }; } // namespace OpenGL |