// Helper function that finds/increments the appropriate entry in a hash map (it counts number
// of draws we will need to allocate for in a batch)
Helper function that finds/increments the appropriate entry in a hash map (it counts number
of draws we will need to allocate for in a batch)
Helper function that finds / increments the appropriate entry in a hash map ( it counts number of draws we will need to allocate for in a batch )
fn add_batched_pass_count(
            view_packet: &ViewPacket<MeshAdvRenderFeatureTypes>,
            mesh_part: &MeshAdvAssetPart,
            render_phase_index: RenderPhaseIndex,
            pass: &ResourceArc<MaterialPassResource>,
            batched_pass_counts: &mut FnvHashMap<MeshAdvBatchedPassKey, usize>,
        ) {
            if view_packet
                .view()
                .phase_index_is_relevant(render_phase_index)
            {
                let key = MeshAdvBatchedPassKey {
                    phase: render_phase_index,
                    view_frame_index: view_packet.view_frame_index(),
                    pass: pass.clone(),
                    index_type: mesh_part.index_type,
                };
                *batched_pass_counts.entry(key).or_default() += 1;
            }
        }
fn add_batched_pass_count ( view_packet : & ViewPacket < MeshAdvRenderFeatureTypes > , mesh_part : & MeshAdvAssetPart , render_phase_index : RenderPhaseIndex , pass : & ResourceArc < MaterialPassResource > , batched_pass_counts : & mut FnvHashMap < MeshAdvBatchedPassKey , usize > , ) { if view_packet . view ( ) . phase_index_is_relevant ( render_phase_index ) { let key = MeshAdvBatchedPassKey { phase : render_phase_index , view_frame_index : view_packet . view_frame_index ( ) , pass : pass . clone ( ) , index_type : mesh_part . index_type , } ; * batched_pass_counts . entry ( key ) . or_default ( ) += 1 ; } }
Helper function that finds/increments the appropriate entry in a hash map (it counts number
of draws we will need to allocate for in a batch)
Helper function that finds / increments the appropriate entry in a hash map ( it counts number of draws we will need to allocate for in a batch )
view_packet
&ViewPacket<MeshAdvRenderFeatureTypes>
mesh_part
&MeshAdvAssetPart
render_phase_index
RenderPhaseIndex
pass
&ResourceArc<MaterialPassResource>
batched_pass_counts
&mut FnvHashMap<MeshAdvBatchedPassKey, usize>