-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times
Description
What problem does this solve or what need does it fill?
Query<&mut RenderPhase<T>>, RenderPipelineCache, SpecializedPipelines (to a lesser degree) requires mutable access to use. Each of these can limit the parallelism of the queue phase when rendering.
Query<&mut RenderPhase<T>>limits it to one system per phase at a time. Generally allows parallelism across mutliple phases at the same time, unless there is one system that requires access to multiple render phases.RenderPipelineCachelimits any dependent pipeline from parallelizing.SpecializedPipelineslimits parallelization across multiple phases within a single extract-prepare-queue pipeline. This is less of an issue than the other two.
What solution would you like?
- Merge
SpecializedPipelinesfunctionality intoRenderPipelinesand make it generic over aSpecializedPipeline. This removes the global pipeline cache as a blocking requirement. Might also improve the ergonomics of writing those kinds of systems. - Switch any/all of the associated types to use internal mutability. Most notably
RenderPhase<T>might benefit the most from this. Adding mutexes may be too much of a cost here. Perhaps a good place to try out lock-free data structures? Worth benchmarking.
What alternative(s) have you considered?
- Recreate render pipelines on every executions.
- Limit time in each queue job by aggressively batching it's inputs in the prepare phase.
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times