mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Fix _free_render_buffer_data freeing shared half_texture and half_fb
This commit is contained in:
parent
79077e6c10
commit
71eb3f6df5
@ -1818,6 +1818,8 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) {
|
||||
if (rb->blur[i].mipmaps[m].fb.is_valid()) {
|
||||
RD::get_singleton()->free(rb->blur[i].mipmaps[m].fb);
|
||||
}
|
||||
// texture and framebuffer in both blur mipmaps are shared, so only free from the first one
|
||||
if (i == 0) {
|
||||
if (rb->blur[i].mipmaps[m].half_fb.is_valid()) {
|
||||
RD::get_singleton()->free(rb->blur[i].mipmaps[m].half_fb);
|
||||
}
|
||||
@ -1825,6 +1827,7 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) {
|
||||
RD::get_singleton()->free(rb->blur[i].mipmaps[m].half_texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
rb->blur[i].mipmaps.clear();
|
||||
|
||||
if (rb->blur[i].texture.is_valid()) {
|
||||
|
Loading…
Reference in New Issue
Block a user