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

Try to actually acquire a frame on Intel/Linux upon adapter inspection #144

Closed
wants to merge 1 commit into from

Conversation

kvark
Copy link
Owner

@kvark kvark commented Jul 18, 2024

Another take at the problem previously addressed by #94/#95/#97

@ConradIrwin
Copy link
Contributor

@kvark I'm planning to pull this into Zed so we can get feedback from people.

@kvark
Copy link
Owner Author

kvark commented Aug 18, 2024

Looks like this path faced some issues for end users

ConradIrwin added a commit to zed-industries/zed that referenced this pull request Aug 28, 2024
This pulls in some experimental initialization changes from kvark/blade#144
ConradIrwin added a commit to zed-industries/zed that referenced this pull request Aug 28, 2024
This pulls in some experimental initialization changes from
kvark/blade#144

Release Notes:

- linux: Improved GPU detection
@apricotbucket28
Copy link
Contributor

Hey, could this be rebased on master to fix #168? Thanks!

@kvark kvark marked this pull request as ready for review September 5, 2024 04:38
@kvark
Copy link
Owner Author

kvark commented Sep 5, 2024

@apricotbucket28 done

@kvark kvark marked this pull request as draft September 5, 2024 04:39
jvmncs pushed a commit to zed-industries/zed that referenced this pull request Sep 6, 2024
Closes #17005

Like #17319, but based on
kvark/blade#144.

This should be cherry-picked into preview if possible 🙂 

Release Notes:

- Linux: Fixed crash when closing windows on Wayland.
notpeter pushed a commit to zed-industries/zed that referenced this pull request Sep 6, 2024
Closes #17005

Like #17319, but based on
kvark/blade#144.

This should be cherry-picked into preview if possible 🙂 

Release Notes:

- Linux: Fixed crash when closing windows on Wayland.
@gretchenfrage
Copy link

Some information that may be relevant to this, especially if kvark finds it inconvenient to test Wayland locally:

  • I still experience the issue described in Closing a window crashes other Zed windows zed-industries/zed#17005 even if I switch Zed to use this branch.
  • On that issue, I just added a backtrace of a segfault I captured with gdb, of encountering this issue. This may be useful as I didn't see a segfault already posted on related issue threads.

@kvark
Copy link
Owner Author

kvark commented Nov 19, 2024

This path is no longer viable, since as of #203 we don't have a specific surface any more when creating a GPU context.
We'll need to find a better path.

@kvark kvark closed this Nov 19, 2024
ConradIrwin added a commit to zed-industries/zed that referenced this pull request Dec 18, 2024
Closes #17005

Release Notes:

- Improved GPU context management: share a single context with multiple
surfaces.

### High Level

Blade got a proper support for Surface objects in
kvark/blade#203.
That was mainly motivated by Zed needing to draw multiple windows. With
the Surface API, Zed is now able to have the GPU context tied to the
"Platform" instead of "Window". Practically speaking, this means:
  - architecture more sound
  - faster to open/close windows
  - less surprises, more robust

### Concerns

1. Zed has been using a temporary workaround for the platform bug on
some Intel+Nvidia machines that makes us unable to present -
kvark/blade#144 . This workaround is no longer
available with the new architecture. I'm looking for ideas on how to
approach this better.
- we are now picking up the change in
kvark/blade#210, which allows forcing a specific
Device ID. This should allow Zed users to work around the issue. We
could help them to automate it, too.
2. ~~Metal-rs dependency is switched to
https://github.com/kvark/metal-rs/tree/blade, since upstream isn't
responsive in merging changes that are required for Blade. Hopefully,
temporary.~~
- ~~we can also hack around it by just transmuting the texture
references, since we know those are unchanged in the branch. That would
allow Blade to use it's own version of Metal, temporarily, if switching
metal-rs in the workspace is a concern.~~
- merged my metal-rs changes and updated Zed to use the upstream github
reference

---------

Co-authored-by: Mikayla Maki <[email protected]>
Co-authored-by: Mikayla Maki <[email protected]>
Co-authored-by: Conrad Irwin <[email protected]>
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.

4 participants