Skip to content
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

metal: add the missing msg_send![view, retain] call within from_view #2976

Merged
merged 2 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ the same every time it is rendered, we now warn if it is missing.
- Fix compilation errors when using wgpu-core in isolation while targetting `wasm32-unknown-unknown` by @Seamooo in [#2922](https://github.com/gfx-rs/wgpu/pull/2922)
- Fixed opening of RenderDoc library by @abuffseagull in [#2930](https://github.com/gfx-rs/wgpu/pull/2930)

#### Metal
- Add the missing `msg_send![view, retain]` call within `from_view` by @jinleili in [#2976](https://github.com/gfx-rs/wgpu/pull/2976)

### Changes

#### General
Expand Down
1 change: 1 addition & 0 deletions wgpu-hal/src/metal/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl super::Surface {
let render_layer =
mem::transmute::<_, &mtl::MetalLayerRef>(Self::get_metal_layer(view, delegate))
.to_owned();
let _: *mut c_void = msg_send![view, retain];
Self::new(NonNull::new(view), render_layer)
}

Expand Down