diff options
Diffstat (limited to 'src/video_core/shader_environment.h')
| -rw-r--r-- | src/video_core/shader_environment.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/shader_environment.h b/src/video_core/shader_environment.h index d26dbfaab..2079979db 100644 --- a/src/video_core/shader_environment.h +++ b/src/video_core/shader_environment.h | |||
| @@ -164,18 +164,19 @@ private: | |||
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | void SerializePipeline(std::span<const char> key, std::span<const GenericEnvironment* const> envs, | 166 | void SerializePipeline(std::span<const char> key, std::span<const GenericEnvironment* const> envs, |
| 167 | const std::filesystem::path& filename); | 167 | const std::filesystem::path& filename, u32 cache_version); |
| 168 | 168 | ||
| 169 | template <typename Key, typename Envs> | 169 | template <typename Key, typename Envs> |
| 170 | void SerializePipeline(const Key& key, const Envs& envs, const std::filesystem::path& filename) { | 170 | void SerializePipeline(const Key& key, const Envs& envs, const std::filesystem::path& filename, |
| 171 | u32 cache_version) { | ||
| 171 | static_assert(std::is_trivially_copyable_v<Key>); | 172 | static_assert(std::is_trivially_copyable_v<Key>); |
| 172 | static_assert(std::has_unique_object_representations_v<Key>); | 173 | static_assert(std::has_unique_object_representations_v<Key>); |
| 173 | SerializePipeline(std::span(reinterpret_cast<const char*>(&key), sizeof(key)), | 174 | SerializePipeline(std::span(reinterpret_cast<const char*>(&key), sizeof(key)), |
| 174 | std::span(envs.data(), envs.size()), filename); | 175 | std::span(envs.data(), envs.size()), filename, cache_version); |
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | void LoadPipelines( | 178 | void LoadPipelines( |
| 178 | std::stop_token stop_loading, const std::filesystem::path& filename, | 179 | std::stop_token stop_loading, const std::filesystem::path& filename, u32 expected_cache_version, |
| 179 | Common::UniqueFunction<void, std::ifstream&, FileEnvironment> load_compute, | 180 | Common::UniqueFunction<void, std::ifstream&, FileEnvironment> load_compute, |
| 180 | Common::UniqueFunction<void, std::ifstream&, std::vector<FileEnvironment>> load_graphics); | 181 | Common::UniqueFunction<void, std::ifstream&, std::vector<FileEnvironment>> load_graphics); |
| 181 | 182 | ||