You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Initialize shader placeholders up front
Then use the placeholder to create the shader instead of swapping RIDs This fixes a false positive that reported leaked shaders
This commit is contained in:
@@ -161,7 +161,7 @@ void ShaderRD::_clear_version(Version *p_version) {
|
||||
// Clear versions if they exist.
|
||||
if (p_version->variants) {
|
||||
for (int i = 0; i < variant_defines.size(); i++) {
|
||||
if (variants_enabled[i] && group_enabled[variant_defines[i].group]) {
|
||||
if (p_version->variants[i].is_valid()) {
|
||||
RD::get_singleton()->free(p_version->variants[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user