summaryrefslogtreecommitdiff
path: root/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2020-02-29 23:26:57 -0800
committerclayjohn <claynjohn@gmail.com>2020-02-29 23:26:57 -0800
commita422b8c497b126d6cd01c75f04f7d544c09f6e3c (patch)
tree9e6338652c6520835e3d598dd6ca69d728399cf0 /servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
parent2a15304572516a8df2dabd9561c959832badf60f (diff)
Properly free reflection probe atlas
Diffstat (limited to 'servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp')
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
index bfe98857d9..4a78fa89ba 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
@@ -653,8 +653,11 @@ void RasterizerSceneRD::reflection_atlas_set_size(RID p_ref_atlas, int p_reflect
//clear and invalidate everything
RD::get_singleton()->free(ra->reflection);
ra->reflection = RID();
+ RD::get_singleton()->free(ra->depth_buffer);
+ ra->depth_buffer = RID();
for (int i = 0; i < ra->reflections.size(); i++) {
+ _clear_reflection_data(ra->reflections.write[i].data);
if (ra->reflections[i].owner.is_null()) {
continue;
}