-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vulkan Mobile leaks RIDs on exit even in empty project (StorageBuffer, Framebuffer, Texture) #89182
Comments
Marking as a good first issue. It might not be the best issue if you are a total beginner at open source and c++. This is more of a good first issue for someone who has a little bit of experience in open source and/or c++ and is looking for a good first task with Godot What we need to do is identify what resources have been created that aren't freed at the end. Most likely everything will be within https://github.com/godotengine/godot/blob/master/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp Resource creation almost always follows the pattern of When exiting the engine, any resource created by the renderer should be freed in the destructor, You can see a few example there already:
|
I can take a look at this. |
After writing this piece of code after line 2840 in destructor I got rid of StorageBuffer warning: for (uint32_t i = 0; i < RENDER_LIST_MAX; i++) {
if (scene_state.instance_buffer[i] != RID()) {
RD::get_singleton()->free(scene_state.instance_buffer[i]);
}
} The code is from "render_forward_clustered.cpp". Why was it deleted from mobile part? |
It looks like that code was missed when the instance data was added to the mobile render (in this commit) The texture and framebuffer leaks were caused by RenderSceneBuffersRD::allocate_blur_textures() |
It seems this issue fixed by #89531. Why not close it? |
Because it's not merged yet, it's not fixed yet :) |
Tested versions
System information
Fedora Linux 39 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) () - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)
Issue description
When exiting the editor after editing a Vulkan Mobile project (empty new project included), the following leaks are reported:
Running a 3D scene doesn't seem to trigger that leak, so it seems to be specific to the editor, possibly the default preview environment?
CC @godotengine/rendering
Steps to reproduce
Minimal reproduction project (MRP)
Empty Vulkan Mobile project
The text was updated successfully, but these errors were encountered: