MONKEY (integration): warm the shafts, fog and AO pipelines on every 3-D view
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
eefd0037db
commit
34f754c5a9
@@ -931,6 +931,12 @@ mod tests {
|
||||
// also has its OWN pair, for the frames nothing claims it, and 2262 found it compiling
|
||||
// live at app exit. `prepare_textures` now specialises that pair on every frame rather
|
||||
// than only on the frame it first needs it.)
|
||||
// - MONKEY (integration) ShaftPipeline (`post::sun_shafts`), FogPipeline
|
||||
// (`volumetric_fog`, incl. lamp fog) and AoPipeline (`ssao`): fullscreen passes keyed
|
||||
// only on the view's target format and MSAA (plus the AO stage/debug flag). Each lane's
|
||||
// `prepare_pipelines` specialises every such key for EVERY `Camera3d` view on every
|
||||
// frame, whether its cvar is on or not, so the variants compile behind the entry cover
|
||||
// and a player enabling the row later hits the cache, not a live compile.
|
||||
let exempt = ["UiGammaPipeline"];
|
||||
let own_src = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("src");
|
||||
let warm_src = std::fs::read_to_string(own_src.join("pipe_warm/mod.rs")).unwrap()
|
||||
|
||||
@@ -221,7 +221,14 @@ fn prepare_pipelines(
|
||||
pipeline: Res<ShaftPipeline>,
|
||||
mut specialized: ResMut<SpecializedRenderPipelines<ShaftPipeline>>,
|
||||
views: Query<(Entity, &ViewTarget, &Msaa), With<ShaftView>>,
|
||||
all_views: Query<(&ViewTarget, &Msaa), With<Camera3d>>,
|
||||
) {
|
||||
// MONKEY (integration): warm every reachable key on every 3-D view, feature on or off, so the
|
||||
// compile happens under the entry cover and never live when the player turns the row on.
|
||||
// (Named in `pipe_warm/menagerie.rs`'s custom-lane census.)
|
||||
for (target, msaa) in &all_views {
|
||||
specialized.specialize(&cache, &pipeline, (target.main_texture_format(), msaa.samples() > 1));
|
||||
}
|
||||
for (entity, target, msaa) in &views {
|
||||
let id = specialized.specialize(
|
||||
&cache,
|
||||
|
||||
@@ -292,8 +292,21 @@ fn prepare_pipelines(
|
||||
pipeline: Res<AoPipeline>,
|
||||
mut specialized: ResMut<SpecializedRenderPipelines<AoPipeline>>,
|
||||
views: Query<(Entity, &ViewTarget, &Msaa), With<AoView>>,
|
||||
all_views: Query<(&ViewTarget, &Msaa), With<Camera3d>>,
|
||||
) {
|
||||
let debug = debug_view();
|
||||
// MONKEY (integration): warm every reachable key on every 3-D view, feature on or off, so the
|
||||
// compile happens under the entry cover and never live when the player turns the row on.
|
||||
// (Named in `pipe_warm/menagerie.rs`'s custom-lane census.)
|
||||
for (target, msaa) in &all_views {
|
||||
for stage in [Stage::Ao, Stage::Blur, Stage::Apply] {
|
||||
specialized.specialize(
|
||||
&cache,
|
||||
&pipeline,
|
||||
(stage, target.main_texture_format(), msaa.samples(), debug),
|
||||
);
|
||||
}
|
||||
}
|
||||
for (entity, target, msaa) in &views {
|
||||
let format = target.main_texture_format();
|
||||
let samples = msaa.samples();
|
||||
|
||||
Reference in New Issue
Block a user