diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-14 03:33:00 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-07 02:20:57 +0100 |
commit | 57fb15d2a3fcc6512145c5a46c18f168994a65b0 (patch) | |
tree | 5c27e73872a6896f62fa6aa7fe8b1578d379cbbb /src/video_core/renderer_opengl/gl_shader_disk_cache.h | |
parent | gl_shader_disk_cache: Add transferable load (diff) | |
download | yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.tar yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.tar.gz yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.tar.bz2 yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.tar.lz yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.tar.xz yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.tar.zst yuzu-57fb15d2a3fcc6512145c5a46c18f168994a65b0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 14 |
1 files changed, 14 insertions, 0 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 46d762b64..fdb29caa5 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -130,6 +130,14 @@ public: } }; +struct ShaderDiskCachePrecompiledEntry { + ShaderDiskCacheUsage usage; + GLenum binary_format; + std::vector<u8> binary; + std::string code; + GLShader::ShaderEntries entries; +}; + class ShaderDiskCacheOpenGL { public: /// Loads transferable cache. If file has a old version, it deletes it. Returns true on success. @@ -142,10 +150,16 @@ public: /// Saves shader usage to the transferable file. Does not check for collisions. void SaveUsage(const ShaderDiskCacheUsage& usage); + /// Saves a precompiled shader entry. Does not check for collisions. + void SavePrecompiled(const ShaderDiskCacheUsage& usage, GLuint program); + private: /// Opens current game's transferable file and write it's header if it doesn't exist FileUtil::IOFile AppendTransferableFile() const; + /// Opens current game's precompiled file and write it's header if it doesn't exist + FileUtil::IOFile AppendPrecompiledFile() const; + /// Create shader disk cache directories. Returns true on success. bool EnsureDirectories() const; |