Fix: EEVEE: Avoid double lock in ShaderModule::module_free

This commit is contained in:
Miguel Pozo
2025-03-05 22:38:06 +01:00
parent 1e4af6719c
commit f96b43cfd4
2 changed files with 6 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ ShaderModule *ShaderModule::module_get()
void ShaderModule::module_free()
{
/* Release handles before the destructor to avoid a double lock. */
module_get()->prepare_for_delete();
get_static_cache().release();
}
@@ -70,7 +73,7 @@ ShaderModule::ShaderModule()
}
}
ShaderModule::~ShaderModule()
void ShaderModule::prepare_for_delete()
{
/* Finish compilation to avoid asserts on exit at GLShaderCompiler destructor. */

View File

@@ -213,9 +213,10 @@ class ShaderModule {
return static_cache;
}
void prepare_for_delete();
public:
ShaderModule();
~ShaderModule();
bool static_shaders_are_ready(bool block_until_ready);
bool request_specializations(bool block_until_ready,