Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions crates/bevy_pbr/src/render/gpu_preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,12 +1302,25 @@ impl FromWorld for PreprocessPipelines {
let direct_bind_group_layout_entries = preprocess_direct_bind_group_layout_entries();
let gpu_frustum_culling_bind_group_layout_entries = gpu_culling_bind_group_layout_entries();
let gpu_early_occlusion_culling_bind_group_layout_entries =
gpu_occlusion_culling_bind_group_layout_entries().extend_with_indices((
(
11,
storage_buffer::<PreprocessWorkItem>(/*has_dynamic_offset=*/ false),
),
(
12,
storage_buffer::<LatePreprocessWorkItemIndirectParameters>(
/*has_dynamic_offset=*/ false,
),
),
));
let gpu_late_occlusion_culling_bind_group_layout_entries =
gpu_occlusion_culling_bind_group_layout_entries().extend_with_indices(((
11,
storage_buffer::<PreprocessWorkItem>(/*has_dynamic_offset=*/ false),
12,
storage_buffer_read_only::<LatePreprocessWorkItemIndirectParameters>(
/*has_dynamic_offset=*/ false,
),
),));
let gpu_late_occlusion_culling_bind_group_layout_entries =
gpu_occlusion_culling_bind_group_layout_entries();

let reset_indirect_batch_sets_bind_group_layout_entries =
DynamicBindGroupLayoutEntries::sequential(
Expand Down Expand Up @@ -1495,12 +1508,6 @@ fn gpu_occlusion_culling_bind_group_layout_entries() -> DynamicBindGroupLayoutEn
10,
texture_2d(TextureSampleType::Float { filterable: true }),
),
(
12,
storage_buffer::<LatePreprocessWorkItemIndirectParameters>(
/*has_dynamic_offset=*/ false,
),
),
))
}

Expand Down
7 changes: 6 additions & 1 deletion crates/bevy_pbr/src/render/mesh_preprocess.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ struct Immediates {
#ifdef EARLY_PHASE
@group(0) @binding(11) var<storage, read_write> late_preprocess_work_items:
array<PreprocessWorkItem>;
#endif // EARLY_PHASE

@group(0) @binding(12) var<storage, read_write> late_preprocess_work_item_indirect_parameters:
array<LatePreprocessWorkItemIndirectParameters>;
#endif // EARLY_PHASE

#ifdef LATE_PHASE
@group(0) @binding(12) var<storage, read> late_preprocess_work_item_indirect_parameters:
array<LatePreprocessWorkItemIndirectParameters>;
#endif // LATE_PHASE

var<immediate> immediates: Immediates;
#endif // OCCLUSION_CULLING
Expand Down