summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_disk_cache.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 20:28:42 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-07 02:23:40 +0100
commit7fefec585c805fa09951da11890bb90afb8a42a9 (patch)
tree739d06767d869ff1f0678aa20cb076a465521744 /src/video_core/renderer_opengl/gl_shader_disk_cache.h
parentgl_shader_disk_cache: Guard reads and writes against failure (diff)
downloadyuzu-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.h13
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