Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/atmosphere/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ impl Plugin for AtmospherePlugin {
.in_set(RenderSystems::PrepareResources)
.after(prepare_atmosphere_textures),
prepare_atmosphere_uniforms
.before(RenderSystems::PrepareResources)
.after(RenderSystems::PrepareAssets),
.in_set(RenderSystems::Prepare)
.before(RenderSystems::PrepareResources),
prepare_atmosphere_probe_bind_groups.in_set(RenderSystems::PrepareBindGroups),
prepare_atmosphere_transforms.in_set(RenderSystems::PrepareResources),
prepare_atmosphere_bind_groups.in_set(RenderSystems::PrepareBindGroups),
Expand Down
7 changes: 5 additions & 2 deletions crates/bevy_render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ pub enum RenderSystems {
Prepare,
/// A sub-set within [`Prepare`](RenderSystems::Prepare) for initializing buffers, textures and uniforms for use in bind groups.
PrepareResources,
/// Collect phase buffers after
/// [`PrepareResources`](RenderSystems::PrepareResources) has run.
/// A sub-set within [`Prepare`](RenderSystems::Prepare) that creates batches for render phases.
PrepareResourcesBatchPhases,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that reduce parallelism since now other systems that don't care about batch phases can't run in parallel? I guess both system sets already have plenty of systems in them so it might not matter at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah im not sure itll be a measurable regression, lets get to ambiguity zero and then see about refining ordering to get parallelism opportunities back imo

/// A sub-set within [`Prepare`](RenderSystems::Prepare) to collect phase buffers after
/// [`PrepareResourcesBatchPhases`](RenderSystems::PrepareResourcesBatchPhases) has run.
PrepareResourcesCollectPhaseBuffers,
/// Flush buffers after [`PrepareResources`](RenderSystems::PrepareResources), but before [`PrepareBindGroups`](RenderSystems::PrepareBindGroups).
PrepareResourcesFlush,
Expand Down Expand Up @@ -242,6 +244,7 @@ impl Render {
schedule.configure_sets(
(
PrepareResources,
PrepareResourcesBatchPhases,
PrepareResourcesCollectPhaseBuffers,
PrepareResourcesFlush,
PrepareBindGroups,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_render/src/render_phase/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ where
>,
),
)
.in_set(RenderSystems::PrepareResources),
.in_set(RenderSystems::PrepareResourcesBatchPhases),
sweep_old_entities::<BPI>.in_set(RenderSystems::QueueSweep),
gpu_preprocessing::collect_buffers_for_phase::<BPI, GFBD>
.run_if(
Expand Down Expand Up @@ -1258,7 +1258,7 @@ where
>,
),
)
.in_set(RenderSystems::PrepareResources),
.in_set(RenderSystems::PrepareResourcesBatchPhases),
gpu_preprocessing::collect_buffers_for_phase::<SPI, GFBD>
.run_if(
resource_exists::<
Expand Down