You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #100213 from DarioSamo/pipeline-hash-map-thread-safety
Improve thread-safety of pipeline hash map.
This commit is contained in:
@@ -4690,10 +4690,10 @@ void RenderForwardClustered::mesh_generate_pipelines(RID p_mesh, bool p_backgrou
|
||||
_mesh_compile_pipelines_for_surface(surface, global_pipeline_data_required, RS::PIPELINE_SOURCE_MESH, &pipeline_pairs);
|
||||
}
|
||||
|
||||
// Try to retrieve all the pipeline pairs that were compiled. This will force the loader to wait on all ubershader pipelines to be ready.
|
||||
// Wait for all the pipelines that were compiled. This will force the loader to wait on all ubershader pipelines to be ready.
|
||||
if (!p_background_compilation && !pipeline_pairs.is_empty()) {
|
||||
for (ShaderPipelinePair pair : pipeline_pairs) {
|
||||
pair.first->pipeline_hash_map.get_pipeline(pair.second, pair.second.hash(), true, RS::PIPELINE_SOURCE_MESH);
|
||||
pair.first->pipeline_hash_map.wait_for_pipeline(pair.second.hash());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user