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

Using default nsview if not provided by raw-window-handle #3329

Open
aclysma opened this issue Aug 12, 2020 · 5 comments
Open

Using default nsview if not provided by raw-window-handle #3329

aclysma opened this issue Aug 12, 2020 · 5 comments

Comments

@aclysma
Copy link

aclysma commented Aug 12, 2020

Short info header:

  • GFX version: gfx-backend-metal 0.5.6
  • OS: macOS
  • GPU: 5700 XT

Would it make sense to apply this change https://github.com/gfx-rs/wgpu/pull/462/files in wgpu to Instance::create_surface?

I am hitting this when adding SDL2 as a backend to bevy.

@kvark
Copy link
Member

kvark commented Aug 12, 2020

Yes, that would make sense

@aclysma
Copy link
Author

aclysma commented Aug 12, 2020

I wasn't sure what branch to put this on. bevy looks like it's using 0.5, and I only applied the change to that branch but only macOS since that's what I'm testing on. This looks like it resolves the issue for me but not sure how you want to proceed with upstreaming this fix.

@msiglreith
Copy link
Contributor

fyi I extracted the conversion process for Metal out in a separate crates (https://github.com/norse-rs/raw-window-metal) for ash-window which might come in handy here. It walks through the handle and tries to retrieve or allocate a CAMetalLayer out of it.

@kvark
Copy link
Member

kvark commented Aug 12, 2020

Let's use it then!

@cart
Copy link

cart commented Aug 16, 2020

Bevy has a 0.6.0 wgpu master branch here you can test on: https://github.com/bevyengine/bevy/commits/wgpu_upgrade

We should focus on supporting that given how close 0.6.0 is.

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

No branches or pull requests

4 participants