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

Allow prepare_windows to run off main thread on all platforms #11672

Merged

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Feb 3, 2024

Objective

Solution

  • Running prepare_windows on the main thread on apple platforms is only mandatory to create surface, which is only needed during window creation. Split that part into its own system that happens before prepare_windows
  • Tested on macOS and iOS

Changelog

  • Allow prepare windows to run off main thread on all platforms.

@mockersf mockersf added A-Rendering Drawing game state to the screen A-Windowing Platform-agnostic interface layer to run your app in C-Performance A change motivated by improving speed, memory usage or compile times labels Feb 3, 2024
@mockersf
Copy link
Member Author

mockersf commented Feb 3, 2024

adding to the 0.13 as a followup of #11660

@mockersf mockersf added this to the 0.13 milestone Feb 3, 2024
crates/bevy_render/src/view/window/mod.rs Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 3, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 3, 2024
Merged via the queue into bevyengine:main with commit 55493a8 Feb 3, 2024
24 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Feb 5, 2024
# Objective

- Change set of systems as I made a mistake in #11672 
- Don't block main when not needed
- Fixes #11235 

## Solution

- add a run condition so that the system won't run and block main if not
needed
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
…gine#11672)

# Objective

- Allow prepare windows to run off of the main thread on all platforms.
- Fixes bevyengine#9964 on all platforms.

## Solution

- Running `prepare_windows` on the main thread on apple platforms is
only mandatory to create surface, which is only needed during window
creation. Split that part into its own system that happens before
`prepare_windows`
- Tested on macOS and iOS

---

## Changelog

- Allow prepare windows to run off main thread on all platforms.
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
# Objective

- Change set of systems as I made a mistake in bevyengine#11672 
- Don't block main when not needed
- Fixes bevyengine#11235 

## Solution

- add a run condition so that the system won't run and block main if not
needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-Windowing Platform-agnostic interface layer to run your app in C-Performance A change motivated by improving speed, memory usage or compile times S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render App systems are blocking the Main app's primary thread
3 participants