File tree 6 files changed +23
-23
lines changed
6 files changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -1011,6 +1011,10 @@ pub fn specialize_material_meshes<M: Material>(
1011
1011
let Ok ( material_asset_id) = material_instance. asset_id . try_typed :: < M > ( ) else {
1012
1012
continue ;
1013
1013
} ;
1014
+ let Some ( mesh_instance) = render_mesh_instances. render_mesh_queue_data ( * visible_entity)
1015
+ else {
1016
+ continue ;
1017
+ } ;
1014
1018
let entity_tick = entity_specialization_ticks. get ( visible_entity) . unwrap ( ) ;
1015
1019
let last_specialized_tick = view_specialized_material_pipeline_cache
1016
1020
. get ( visible_entity)
@@ -1022,10 +1026,6 @@ pub fn specialize_material_meshes<M: Material>(
1022
1026
if !needs_specialization {
1023
1027
continue ;
1024
1028
}
1025
- let Some ( mesh_instance) = render_mesh_instances. render_mesh_queue_data ( * visible_entity)
1026
- else {
1027
- continue ;
1028
- } ;
1029
1029
let Some ( mesh) = render_meshes. get ( mesh_instance. mesh_asset_id ) else {
1030
1030
continue ;
1031
1031
} ;
Original file line number Diff line number Diff line change @@ -945,6 +945,10 @@ pub fn specialize_prepass_material_meshes<M>(
945
945
let Ok ( material_asset_id) = material_instance. asset_id . try_typed :: < M > ( ) else {
946
946
continue ;
947
947
} ;
948
+ let Some ( mesh_instance) = render_mesh_instances. render_mesh_queue_data ( * visible_entity)
949
+ else {
950
+ continue ;
951
+ } ;
948
952
let entity_tick = entity_specialization_ticks. get ( visible_entity) . unwrap ( ) ;
949
953
let last_specialized_tick = view_specialized_material_pipeline_cache
950
954
. get ( visible_entity)
@@ -956,10 +960,6 @@ pub fn specialize_prepass_material_meshes<M>(
956
960
if !needs_specialization {
957
961
continue ;
958
962
}
959
- let Some ( mesh_instance) = render_mesh_instances. render_mesh_queue_data ( * visible_entity)
960
- else {
961
- continue ;
962
- } ;
963
963
let Some ( material) = render_materials. get ( material_asset_id) else {
964
964
continue ;
965
965
} ;
Original file line number Diff line number Diff line change @@ -1817,6 +1817,11 @@ pub fn specialize_shadows<M: Material>(
1817
1817
let Ok ( material_asset_id) = material_instances. asset_id . try_typed :: < M > ( ) else {
1818
1818
continue ;
1819
1819
} ;
1820
+ let Some ( mesh_instance) =
1821
+ render_mesh_instances. render_mesh_queue_data ( visible_entity)
1822
+ else {
1823
+ continue ;
1824
+ } ;
1820
1825
let entity_tick = entity_specialization_ticks. get ( & visible_entity) . unwrap ( ) ;
1821
1826
let last_specialized_tick = view_specialized_material_pipeline_cache
1822
1827
. get ( & visible_entity)
@@ -1831,11 +1836,6 @@ pub fn specialize_shadows<M: Material>(
1831
1836
let Some ( material) = render_materials. get ( material_asset_id) else {
1832
1837
continue ;
1833
1838
} ;
1834
- let Some ( mesh_instance) =
1835
- render_mesh_instances. render_mesh_queue_data ( visible_entity)
1836
- else {
1837
- continue ;
1838
- } ;
1839
1839
if !mesh_instance
1840
1840
. flags
1841
1841
. contains ( RenderMeshInstanceFlags :: SHADOW_CASTER )
Original file line number Diff line number Diff line change @@ -780,6 +780,10 @@ pub fn specialize_wireframes(
780
780
if !render_wireframe_instances. contains_key ( visible_entity) {
781
781
continue ;
782
782
} ;
783
+ let Some ( mesh_instance) = render_mesh_instances. render_mesh_queue_data ( * visible_entity)
784
+ else {
785
+ continue ;
786
+ } ;
783
787
let entity_tick = entity_specialization_ticks. get ( visible_entity) . unwrap ( ) ;
784
788
let last_specialized_tick = view_specialized_material_pipeline_cache
785
789
. get ( visible_entity)
@@ -791,10 +795,6 @@ pub fn specialize_wireframes(
791
795
if !needs_specialization {
792
796
continue ;
793
797
}
794
- let Some ( mesh_instance) = render_mesh_instances. render_mesh_queue_data ( * visible_entity)
795
- else {
796
- continue ;
797
- } ;
798
798
let Some ( mesh) = render_meshes. get ( mesh_instance. mesh_asset_id ) else {
799
799
continue ;
800
800
} ;
Original file line number Diff line number Diff line change @@ -722,6 +722,9 @@ pub fn specialize_material2d_meshes<M: Material2d>(
722
722
let Some ( material_asset_id) = render_material_instances. get ( visible_entity) else {
723
723
continue ;
724
724
} ;
725
+ let Some ( mesh_instance) = render_mesh_instances. get_mut ( visible_entity) else {
726
+ continue ;
727
+ } ;
725
728
let entity_tick = entity_specialization_ticks. get ( visible_entity) . unwrap ( ) ;
726
729
let last_specialized_tick = view_specialized_material_pipeline_cache
727
730
. get ( visible_entity)
@@ -733,9 +736,6 @@ pub fn specialize_material2d_meshes<M: Material2d>(
733
736
if !needs_specialization {
734
737
continue ;
735
738
}
736
- let Some ( mesh_instance) = render_mesh_instances. get_mut ( visible_entity) else {
737
- continue ;
738
- } ;
739
739
let Some ( material_2d) = render_materials. get ( * material_asset_id) else {
740
740
continue ;
741
741
} ;
Original file line number Diff line number Diff line change @@ -771,6 +771,9 @@ pub fn specialize_wireframes(
771
771
if !render_wireframe_instances. contains_key ( visible_entity) {
772
772
continue ;
773
773
} ;
774
+ let Some ( mesh_instance) = render_mesh_instances. get ( visible_entity) else {
775
+ continue ;
776
+ } ;
774
777
let entity_tick = entity_specialization_ticks. get ( visible_entity) . unwrap ( ) ;
775
778
let last_specialized_tick = view_specialized_material_pipeline_cache
776
779
. get ( visible_entity)
@@ -782,9 +785,6 @@ pub fn specialize_wireframes(
782
785
if !needs_specialization {
783
786
continue ;
784
787
}
785
- let Some ( mesh_instance) = render_mesh_instances. get ( visible_entity) else {
786
- continue ;
787
- } ;
788
788
let Some ( mesh) = render_meshes. get ( mesh_instance. mesh_asset_id ) else {
789
789
continue ;
790
790
} ;
You can’t perform that action at this time.
0 commit comments