Move specialize_* to QueueMeshes. (#17719)
# Objective Things were breaking post-cs. ## Solution `specialize_mesh_materials` must run after `collect_meshes_for_gpu_building`. Therefore, its placement in the `PrepareAssets` set didn't make sense (also more generally). To fix, we put this class of system in ~`PrepareResources`~ `QueueMeshes`, although it potentially could use a more descriptive location. We may want to review the placement of `check_views_need_specialization` which is also currently in `PrepareAssets`.
This commit is contained in:
parent
2d62026912
commit
af6629cbe9
@ -314,9 +314,10 @@ where
|
||||
Render,
|
||||
(
|
||||
specialize_material_meshes::<M>
|
||||
.in_set(RenderSet::PrepareAssets)
|
||||
.in_set(RenderSet::PrepareMeshes)
|
||||
.after(prepare_assets::<PreparedMaterial<M>>)
|
||||
.after(prepare_assets::<RenderMesh>),
|
||||
.after(prepare_assets::<RenderMesh>)
|
||||
.after(collect_meshes_for_gpu_building),
|
||||
queue_material_meshes::<M>
|
||||
.in_set(RenderSet::QueueMeshes)
|
||||
.after(prepare_assets::<PreparedMaterial<M>>),
|
||||
@ -339,7 +340,7 @@ where
|
||||
(
|
||||
check_views_lights_need_specialization.in_set(RenderSet::PrepareAssets),
|
||||
specialize_shadows::<M>
|
||||
.in_set(RenderSet::PrepareAssets)
|
||||
.in_set(RenderSet::PrepareMeshes)
|
||||
.after(prepare_assets::<PreparedMaterial<M>>),
|
||||
queue_shadows::<M>
|
||||
.in_set(RenderSet::QueueMeshes)
|
||||
|
@ -2,12 +2,12 @@ mod prepass_bindings;
|
||||
|
||||
use crate::{
|
||||
alpha_mode_pipeline_key, binding_arrays_are_usable, buffer_layout,
|
||||
material_bind_groups::MaterialBindGroupAllocator, queue_material_meshes,
|
||||
setup_morph_and_skinning_defs, skin, DrawMesh, EntitySpecializationTicks, Material,
|
||||
MaterialPipeline, MaterialPipelineKey, MeshLayouts, MeshPipeline, MeshPipelineKey,
|
||||
OpaqueRendererMethod, PreparedMaterial, RenderLightmaps, RenderMaterialInstances,
|
||||
RenderMeshInstanceFlags, RenderMeshInstances, RenderPhaseType, SetMaterialBindGroup,
|
||||
SetMeshBindGroup, ShadowView, StandardMaterial,
|
||||
collect_meshes_for_gpu_building, material_bind_groups::MaterialBindGroupAllocator,
|
||||
queue_material_meshes, setup_morph_and_skinning_defs, skin, DrawMesh,
|
||||
EntitySpecializationTicks, Material, MaterialPipeline, MaterialPipelineKey, MeshLayouts,
|
||||
MeshPipeline, MeshPipelineKey, OpaqueRendererMethod, PreparedMaterial, RenderLightmaps,
|
||||
RenderMaterialInstances, RenderMeshInstanceFlags, RenderMeshInstances, RenderPhaseType,
|
||||
SetMaterialBindGroup, SetMeshBindGroup, ShadowView, StandardMaterial,
|
||||
};
|
||||
use bevy_app::{App, Plugin, PreUpdate};
|
||||
use bevy_render::{
|
||||
@ -61,7 +61,7 @@ use bevy_ecs::system::SystemChangeTick;
|
||||
use bevy_platform_support::collections::HashMap;
|
||||
use bevy_render::sync_world::{MainEntity, MainEntityHashMap};
|
||||
use bevy_render::view::RenderVisibleEntities;
|
||||
use bevy_render::RenderSet::PrepareAssets;
|
||||
use bevy_render::RenderSet::{PrepareAssets, PrepareResources};
|
||||
use core::{hash::Hash, marker::PhantomData};
|
||||
|
||||
pub const PREPASS_SHADER_HANDLE: Handle<Shader> =
|
||||
@ -190,7 +190,7 @@ where
|
||||
.add_systems(ExtractSchedule, extract_camera_previous_view_data)
|
||||
.add_systems(
|
||||
Render,
|
||||
prepare_previous_view_uniforms.in_set(RenderSet::PrepareResources),
|
||||
prepare_previous_view_uniforms.in_set(PrepareResources),
|
||||
);
|
||||
}
|
||||
|
||||
@ -207,9 +207,10 @@ where
|
||||
(
|
||||
check_prepass_views_need_specialization.in_set(PrepareAssets),
|
||||
specialize_prepass_material_meshes::<M>
|
||||
.in_set(PrepareAssets)
|
||||
.in_set(RenderSet::PrepareMeshes)
|
||||
.after(prepare_assets::<PreparedMaterial<M>>)
|
||||
.after(prepare_assets::<RenderMesh>),
|
||||
.after(prepare_assets::<RenderMesh>)
|
||||
.after(collect_meshes_for_gpu_building),
|
||||
queue_prepass_material_meshes::<M>
|
||||
.in_set(RenderSet::QueueMeshes)
|
||||
.after(prepare_assets::<PreparedMaterial<M>>)
|
||||
|
@ -287,7 +287,7 @@ where
|
||||
Render,
|
||||
(
|
||||
specialize_material2d_meshes::<M>
|
||||
.in_set(RenderSet::PrepareAssets)
|
||||
.in_set(RenderSet::PrepareMeshes)
|
||||
.after(prepare_assets::<PreparedMaterial2d<M>>)
|
||||
.after(prepare_assets::<RenderMesh>),
|
||||
queue_material2d_meshes::<M>
|
||||
|
Loading…
Reference in New Issue
Block a user