mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-23 19:55:45 +01:00
vk_pipeline_cache: Skip cached pipelines with different dynamic state
This commit is contained in:
parent
5445799260
commit
41cca8b8ad
@ -391,10 +391,16 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
|
|||||||
});
|
});
|
||||||
++state.total;
|
++state.total;
|
||||||
}};
|
}};
|
||||||
|
const bool extended_dynamic_state = device.IsExtExtendedDynamicStateSupported();
|
||||||
|
const bool dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported();
|
||||||
const auto load_graphics{[&](std::ifstream& file, std::vector<FileEnvironment> envs) {
|
const auto load_graphics{[&](std::ifstream& file, std::vector<FileEnvironment> envs) {
|
||||||
GraphicsPipelineCacheKey key;
|
GraphicsPipelineCacheKey key;
|
||||||
file.read(reinterpret_cast<char*>(&key), sizeof(key));
|
file.read(reinterpret_cast<char*>(&key), sizeof(key));
|
||||||
|
|
||||||
|
if ((key.state.extended_dynamic_state != 0) != extended_dynamic_state ||
|
||||||
|
(key.state.dynamic_vertex_input != 0) != dynamic_vertex_input) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
workers.QueueWork([this, key, envs = std::move(envs), &state, &callback]() mutable {
|
workers.QueueWork([this, key, envs = std::move(envs), &state, &callback]() mutable {
|
||||||
ShaderPools pools;
|
ShaderPools pools;
|
||||||
boost::container::static_vector<Shader::Environment*, 5> env_ptrs;
|
boost::container::static_vector<Shader::Environment*, 5> env_ptrs;
|
||||||
|
Loading…
Reference in New Issue
Block a user