summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Haas <Hinsbart@users.noreply.github.com>2017-10-10 20:57:09 +0200
committerGitHub <noreply@github.com>2017-10-10 20:57:09 +0200
commitdda64a3de6f57ff750370e1818f057149686c8fa (patch)
tree94f873d1bdff94aa2f2f88494a330b3dfc3d1946
parent08f10d880396d34a38aa57fe513384598e5cef0d (diff)
parent1967972f6e5ba838f2e9ef3f67e0ebe300feffbb (diff)
Merge pull request #11959 from hi-ogawa/fix-shadow-atlas-invalidation
Track LightInstance::shadow_atlases so that it will be freed properly
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index eaf0b06664..4c9d0f181e 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -379,6 +379,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in
sh->owner = p_light_intance;
sh->alloc_tick = tick;
sh->version = p_light_version;
+ li->shadow_atlases.insert(p_atlas);
//make new key
key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
@@ -414,6 +415,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in
sh->owner = p_light_intance;
sh->alloc_tick = tick;
sh->version = p_light_version;
+ li->shadow_atlases.insert(p_atlas);
//make new key
uint32_t key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;