Merge pull request #56889 from clayjohn/VULKAN-fog-mem

Fix volumetric fog memory leak on resize
This commit is contained in:
Rémi Verschelde 2022-01-18 07:46:23 +01:00 committed by GitHub
commit 8ae86f608a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4011,6 +4011,9 @@ void RendererSceneRenderRD::_volumetric_fog_erase(RenderBuffers *rb) {
RD::get_singleton()->free(rb->volumetric_fog->prev_light_density_map);
RD::get_singleton()->free(rb->volumetric_fog->light_density_map);
RD::get_singleton()->free(rb->volumetric_fog->fog_map);
RD::get_singleton()->free(rb->volumetric_fog->density_map);
RD::get_singleton()->free(rb->volumetric_fog->light_map);
RD::get_singleton()->free(rb->volumetric_fog->emissive_map);
if (rb->volumetric_fog->fog_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->fog_uniform_set)) {
RD::get_singleton()->free(rb->volumetric_fog->fog_uniform_set);