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

fix: crash on macOS #1

Open
wants to merge 56 commits into
base: fsundvik/wgpu
Choose a base branch
from
Open

Conversation

qinyuhang
Copy link

@qinyuhang qinyuhang commented Apr 9, 2023

What kind of change does this PR introduce?

  • Fix: crash on macOS

Detail

When cargo run on macOS, the neovide crashed with crash log:

'called `Option::unwrap()` on a `None` value'. (File: src/renderer/renderer.rs; Line: 109, Column: 18)

It is mainly because call DX12 on all platform.
After change to conditional choose GPU, macOS require get METAL in UI thread

KNOWN ISSUE: the window is transparent in macOS, only the titlebar is presented

image

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

Most of it replaced by winit
Basically release with debug symbols
This optimizes the scrolling a bit, especially pure up/down.
This currently disables smooth scrolling. Which will be re-implemented
using the scroll events and the skia pictures instead of the old
scrolling snapshots.
This also optimizes the blurring step, to not be done unless needed.
Also removes the neovide_floating_opacity setting, since it's not clear
how that should interact with neovim's default way of dealing with
transparncy.
All events are now processed before allowing rendering. All attempts to
limit the frame rate is also removed temporarily.
The idea is to have the update phase determine if rendering is needed.
But currently that's not dealt with correctly.
This properly submits everything to the GPU
@qinyuhang

This comment was marked as outdated.

@qinyuhang qinyuhang force-pushed the wgpu branch 2 times, most recently from 32004fb to 656bbf4 Compare April 9, 2023 04:05
@qinyuhang

This comment was marked as outdated.

@qinyuhang qinyuhang marked this pull request as ready for review April 10, 2023 06:07
The crash log:
'called `Option::unwrap()` on a `None` value'. (File: src/renderer/renderer.rs; Line: 109, Column: 18)

It is mainly because call DX12 on all platform.
After change to conditional choose GPU, macOS require get METAL in UI
thread

KNOWN ISSUE: the window is transparent in macOS, only the titlebar is
presented
@qinyuhang
Copy link
Author

I think the main reason of the empty window body could be reuse of render_pass. Maybe instead of reuse one MainRenderPass, we can create one pass for each part of the view, saying background_render_pass, foreground_render_pass, cursor_render_pass, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants