Skip to content

Commit

Permalink
Actually free backbuffer depth stencil
Browse files Browse the repository at this point in the history
  • Loading branch information
EIREXE committed Nov 14, 2024
1 parent 7ee4d0d commit 795545e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,11 @@ void TextureStorage::_clear_render_target(RenderTarget *rt) {
rt->depth_stencil_multisample = RID();
}

if (rt->backbuffer_depth_stencil.is_valid()) {
RD::get_singleton()->free(rt->backbuffer_depth_stencil);
rt->backbuffer_depth_stencil = RID();
}

if (rt->backbuffer.is_valid()) {
RD::get_singleton()->free(rt->backbuffer);
rt->backbuffer = RID();
Expand Down

0 comments on commit 795545e

Please sign in to comment.