mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
View filter for batch_and_prepare_render_phase (#14713)
# Objective - batch_and_prepare_render_phase will iterate all living entities ,which potentially causes a lot of unnecessary look up - from https://github.com/bevyengine/bevy/pull/14449#issuecomment-2282876034 ## Solution - added View filter
This commit is contained in:
parent
61a1530c56
commit
032fd486c7
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ use crate::{
|
|||
},
|
||||
render_resource::{BufferVec, GpuArrayBufferable, RawBufferVec, UninitBufferVec},
|
||||
renderer::{RenderAdapter, RenderDevice, RenderQueue},
|
||||
view::{GpuCulling, ViewTarget},
|
||||
view::{ExtractedView, GpuCulling, ViewTarget},
|
||||
Render, RenderApp, RenderSet,
|
||||
};
|
||||
|
||||
|
@ -386,7 +386,7 @@ pub fn batch_and_prepare_sorted_render_phase<I, GFBD>(
|
|||
gpu_array_buffer: ResMut<BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>>,
|
||||
mut indirect_parameters_buffer: ResMut<IndirectParametersBuffer>,
|
||||
mut sorted_render_phases: ResMut<ViewSortedRenderPhases<I>>,
|
||||
mut views: Query<(Entity, Has<GpuCulling>)>,
|
||||
mut views: Query<(Entity, Has<GpuCulling>), With<ExtractedView>>,
|
||||
system_param_item: StaticSystemParam<GFBD::Param>,
|
||||
) where
|
||||
I: CachedRenderPipelinePhaseItem + SortedPhaseItem,
|
||||
|
@ -503,7 +503,7 @@ pub fn batch_and_prepare_binned_render_phase<BPI, GFBD>(
|
|||
gpu_array_buffer: ResMut<BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>>,
|
||||
mut indirect_parameters_buffer: ResMut<IndirectParametersBuffer>,
|
||||
mut binned_render_phases: ResMut<ViewBinnedRenderPhases<BPI>>,
|
||||
mut views: Query<(Entity, Has<GpuCulling>)>,
|
||||
mut views: Query<(Entity, Has<GpuCulling>), With<ExtractedView>>,
|
||||
param: StaticSystemParam<GFBD::Param>,
|
||||
) where
|
||||
BPI: BinnedPhaseItem,
|
||||
|
|
Loading…
Reference in a new issue