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

Parallel pipeline compliation #8224

Closed
JMS55 opened this issue Mar 26, 2023 · 1 comment · Fixed by #10812
Closed

Parallel pipeline compliation #8224

JMS55 opened this issue Mar 26, 2023 · 1 comment · Fixed by #10812
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible S-Blocked This cannot move forward until something else changes

Comments

@JMS55
Copy link
Contributor

JMS55 commented Mar 26, 2023

What problem does this solve or what need does it fill?

Compiling pipelines is expensive. Currently, we compile waiting pipelines in serial each frame.

I'm also not sure if the pipeline processing system can run in parallel with other systems.

What solution would you like?

Parallelize the inner loop over processing pipelines, and also the system if needed.

Other Context

I believe we're blocked on wpgu for this at the moment. Wgpu currently locks each object, so we can't really do things in parallel gfx-rs/wgpu#2710.

@JMS55 JMS55 added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen labels Mar 26, 2023
@JMS55 JMS55 modified the milestone: 0.11 Mar 26, 2023
@james7132 james7132 added the S-Blocked This cannot move forward until something else changes label Mar 26, 2023
@JMS55
Copy link
Contributor Author

JMS55 commented May 27, 2023

We'll also want to use gfx-rs/wgpu#3794 when it lands

github-merge-queue bot pushed a commit that referenced this issue Feb 5, 2024
# Objective

- Pipeline compilation is slow and blocks the frame
- Closes #8224

## Solution

- Compile pipelines in a Task on the AsyncComputeTaskPool

---

## Changelog

- Render/compute pipeline compilation is now done asynchronously over
multiple frames when the multi-threaded feature is enabled and on
non-wasm and non-macOS platforms
- Added `CachedPipelineState::Creating` 
- Added `PipelineCache::block_on_render_pipeline()`
- Added `bevy_utils::futures::check_ready`
- Added `bevy_render/multi-threaded` cargo feature

## Migration Guide

- Match on the new `Creating` variant for exhaustive matches of
`CachedPipelineState`
lynn-lumen pushed a commit to lynn-lumen/bevy that referenced this issue Feb 5, 2024
# Objective

- Pipeline compilation is slow and blocks the frame
- Closes bevyengine#8224

## Solution

- Compile pipelines in a Task on the AsyncComputeTaskPool

---

## Changelog

- Render/compute pipeline compilation is now done asynchronously over
multiple frames when the multi-threaded feature is enabled and on
non-wasm and non-macOS platforms
- Added `CachedPipelineState::Creating` 
- Added `PipelineCache::block_on_render_pipeline()`
- Added `bevy_utils::futures::check_ready`
- Added `bevy_render/multi-threaded` cargo feature

## Migration Guide

- Match on the new `Creating` variant for exhaustive matches of
`CachedPipelineState`
tjamaan pushed a commit to tjamaan/bevy that referenced this issue Feb 6, 2024
# Objective

- Pipeline compilation is slow and blocks the frame
- Closes bevyengine#8224

## Solution

- Compile pipelines in a Task on the AsyncComputeTaskPool

---

## Changelog

- Render/compute pipeline compilation is now done asynchronously over
multiple frames when the multi-threaded feature is enabled and on
non-wasm and non-macOS platforms
- Added `CachedPipelineState::Creating` 
- Added `PipelineCache::block_on_render_pipeline()`
- Added `bevy_utils::futures::check_ready`
- Added `bevy_render/multi-threaded` cargo feature

## Migration Guide

- Match on the new `Creating` variant for exhaustive matches of
`CachedPipelineState`
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 C-Feature A new feature, making something new possible S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants