mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 16:07:57 -05:00
shader_environment: Receive cache version from outside
This allows us invalidating OpenGL and Vulkan separately in the future.
This commit is contained in:
@ -164,18 +164,19 @@ private:
|
||||
};
|
||||
|
||||
void SerializePipeline(std::span<const char> key, std::span<const GenericEnvironment* const> envs,
|
||||
const std::filesystem::path& filename);
|
||||
const std::filesystem::path& filename, u32 cache_version);
|
||||
|
||||
template <typename Key, typename Envs>
|
||||
void SerializePipeline(const Key& key, const Envs& envs, const std::filesystem::path& filename) {
|
||||
void SerializePipeline(const Key& key, const Envs& envs, const std::filesystem::path& filename,
|
||||
u32 cache_version) {
|
||||
static_assert(std::is_trivially_copyable_v<Key>);
|
||||
static_assert(std::has_unique_object_representations_v<Key>);
|
||||
SerializePipeline(std::span(reinterpret_cast<const char*>(&key), sizeof(key)),
|
||||
std::span(envs.data(), envs.size()), filename);
|
||||
std::span(envs.data(), envs.size()), filename, cache_version);
|
||||
}
|
||||
|
||||
void LoadPipelines(
|
||||
std::stop_token stop_loading, const std::filesystem::path& filename,
|
||||
std::stop_token stop_loading, const std::filesystem::path& filename, u32 expected_cache_version,
|
||||
Common::UniqueFunction<void, std::ifstream&, FileEnvironment> load_compute,
|
||||
Common::UniqueFunction<void, std::ifstream&, std::vector<FileEnvironment>> load_graphics);
|
||||
|
||||
|
Reference in New Issue
Block a user