Skip to content

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

Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom
mockersf:prepare-window-off-main-thread
Feb 3, 2024
Merged

Allow prepare_windows to run off main thread on all platforms#11672
alice-i-cecile merged 5 commits intobevyengine:mainfrom
mockersf:prepare-window-off-main-thread

Conversation

@mockersf
Copy link
Copy Markdown
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 mockersf requested review from hymm and james7132 February 3, 2024 07:34
@mockersf
Copy link
Copy Markdown
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
@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
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