diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-15 20:28:42 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-07 02:23:40 +0100 |
commit | 7fefec585c805fa09951da11890bb90afb8a42a9 (patch) | |
tree | 739d06767d869ff1f0678aa20cb076a465521744 /src/video_core/renderer_opengl/gl_shader_disk_cache.h | |
parent | gl_shader_disk_cache: Guard reads and writes against failure (diff) | |
download | yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.tar yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.tar.gz yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.tar.bz2 yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.tar.lz yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.tar.xz yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.tar.zst yuzu-7fefec585c805fa09951da11890bb90afb8a42a9.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h index ddcd4cf51..061c4f204 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -18,9 +18,13 @@ #include "video_core/engines/maxwell_3d.h" #include "video_core/renderer_opengl/gl_shader_gen.h" +namespace Core { +class System; +} + namespace FileUtil { class IOFile; -} // namespace FileUtil +} namespace OpenGL { @@ -148,6 +152,8 @@ struct ShaderDiskCacheDump { class ShaderDiskCacheOpenGL { public: + explicit ShaderDiskCacheOpenGL(Core::System& system); + /// Loads transferable cache. If file has a old version or on failure, it deletes the file. std::optional<std::pair<std::vector<ShaderDiskCacheRaw>, std::vector<ShaderDiskCacheUsage>>> LoadTransferable(); @@ -217,6 +223,11 @@ private: /// Get user's shader directory path std::string GetBaseDir() const; + /// Get current game's title id + std::string GetTitleID() const; + + // Copre system + Core::System& system; // Stored transferable shaders std::map<u64, std::set<ShaderDiskCacheUsage>> transferable; // The cache has been loaded at boot |