-
Notifications
You must be signed in to change notification settings - Fork 969
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
Surfaces leak, never being destroyed #3646
Comments
This is caused by this code being commented out: wgpu/wgpu/src/backend/direct.rs Line 1554 in 77d6696
|
BenjaminSchaaf
pushed a commit
to BenjaminSchaaf/wgpu
that referenced
this issue
Apr 4, 2023
Surfaces weren't being dropped until exit due to the code commented out in Context::surface_drop. This hid a bug where surfaces dropped before exit weren't being unconfigured. Fixes gfx-rs#3646
BenjaminSchaaf
pushed a commit
to BenjaminSchaaf/wgpu
that referenced
this issue
Apr 4, 2023
Surfaces weren't being dropped until exit due to the code commented out in Context::surface_drop. This hid a bug where surfaces dropped before exit weren't being unconfigured. Fixes gfx-rs#3646
BenjaminSchaaf
pushed a commit
to BenjaminSchaaf/wgpu
that referenced
this issue
Apr 4, 2023
Surfaces weren't being dropped until exit due to the code commented out in Context::surface_drop. This hid a bug where surfaces dropped before exit weren't being unconfigured. Fixes gfx-rs#3646
BenjaminSchaaf
pushed a commit
to BenjaminSchaaf/wgpu
that referenced
this issue
Apr 4, 2023
Surfaces weren't being dropped until exit due to the code commented out in Context::surface_drop. This hid a bug where surfaces dropped before exit weren't being unconfigured. Fixes gfx-rs#3646
BenjaminSchaaf
pushed a commit
to BenjaminSchaaf/wgpu
that referenced
this issue
Apr 5, 2023
Surfaces weren't being dropped until exit due to the code commented out in Context::surface_drop. This hid a bug where surfaces dropped before exit weren't being unconfigured. Fixes gfx-rs#3646
cwfitzgerald
pushed a commit
that referenced
this issue
Apr 5, 2023
Co-authored-by: Benjamin Schaaf <[email protected]> Fixes #3646
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When making multiple surfaces the surfaces get leaked until program exit.
Incidentally this bug hides a different bug where destroying a surface leads to a vulkan validation error, as surfaces are not unconfigured before being destroyed.
Repro steps
wgpu-hal/src/vulkan/instance.rs#create_surface
andwgpu-hal/src/vulkan/instance.rs#destroy_surface
Example project: https://gist.github.com/BenjaminSchaaf/46773ca8f1dc7217372c42d06922fd33
Expected vs observed behavior
Surfaces should be destroyed when the
Surface
is dropped, instead of leaking.Platform
This happens on master with vulkan.
The text was updated successfully, but these errors were encountered: