Skip to content

Commit

Permalink
Ignore PipelineCache ambiguities (bevyengine#14772)
Browse files Browse the repository at this point in the history
# Objective

The `prepare_view_upscaling_pipelines` system has dozens of ambiguities,
which makes it harder to spot and prevent new ambiguities.

Closes bevyengine#14770.

## Solution

Just exclude the system from ambiguity detection. See the linked issue
for more context on why this resolution was chosen.

## Testing

Running the `ambiguity_detection` example now reports dozens fewer
`Render` app ambiguities.
  • Loading branch information
alice-i-cecile committed Aug 16, 2024
1 parent bc445bb commit da529ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/bevy_core_pipeline/src/upscaling/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ impl Plugin for UpscalingPlugin {
if let Some(render_app) = app.get_sub_app_mut(RenderApp) {
render_app.add_systems(
Render,
prepare_view_upscaling_pipelines.in_set(RenderSet::Prepare),
// This system should probably technically be run *after* all of the other systems
// that might modify `PipelineCache` via interior mutability, but for now,
// we've chosen to simply ignore the ambiguities out of a desire for a better refactor
// and aversion to extensive and intrusive system ordering.
// See https://github.com/bevyengine/bevy/issues/14770 for more context.
prepare_view_upscaling_pipelines
.in_set(RenderSet::Prepare)
.ambiguous_with_all(),
);
}
}
Expand Down

0 comments on commit da529ff

Please sign in to comment.