Skip to content

Commit

Permalink
yeet unnecessary .view_layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
IceSentry committed May 12, 2024
1 parent f88a522 commit 93d91cf
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
2 changes: 0 additions & 2 deletions crates/bevy_gizmos/src/pipeline_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ impl SpecializedRenderPipeline for LineGizmoPipeline {

let view_layout = self
.mesh_pipeline
.view_layouts
.get_view_layout(key.view_key.into())
.clone();

Expand Down Expand Up @@ -209,7 +208,6 @@ impl SpecializedRenderPipeline for LineJointGizmoPipeline {

let view_layout = self
.mesh_pipeline
.view_layouts
.get_view_layout(key.view_key.into())
.clone();

Expand Down
5 changes: 1 addition & 4 deletions crates/bevy_pbr/src/deferred/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,7 @@ impl SpecializedRenderPipeline for DeferredLightingLayout {
RenderPipelineDescriptor {
label: Some("deferred_lighting_pipeline".into()),
layout: vec![
self.mesh_pipeline
.view_layouts
.get_view_layout(key.into())
.clone(),
self.mesh_pipeline.get_view_layout(key.into()).clone(),
self.bind_group_layout_1.clone(),
],
vertex: VertexState {
Expand Down
5 changes: 1 addition & 4 deletions crates/bevy_pbr/src/meshlet/material_draw_prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,7 @@ pub fn prepare_material_meshlet_meshes_main_opaque_pass<M: Material>(
let pipeline_descriptor = RenderPipelineDescriptor {
label: material_pipeline_descriptor.label,
layout: vec![
mesh_pipeline
.view_layouts
.get_view_layout(view_key.into())
.clone(),
mesh_pipeline.get_view_layout(view_key.into()).clone(),
gpu_scene.material_draw_bind_group_layout(),
material_pipeline.material_layout.clone(),
],
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/render/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ impl SpecializedMeshPipeline for MeshPipeline {
shader_defs.push("PBR_MULTI_LAYER_MATERIAL_TEXTURES_SUPPORTED".into());
}

let mut bind_group_layout = vec![self.view_layouts.get_view_layout(key.into()).clone()];
let mut bind_group_layout = vec![self.get_view_layout(key.into()).clone()];

if key.msaa_samples() > 1 {
shader_defs.push("MULTISAMPLED".into());
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/render/mesh_view_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ pub fn prepare_mesh_view_bind_groups(
.map(|t| &t.screen_space_ambient_occlusion_texture.default_view)
.unwrap_or(&fallback_ssao);

let layout = &mesh_pipeline.view_layouts.get_view_layout(
let layout = &mesh_pipeline.get_view_layout(
MeshPipelineViewLayoutKey::from(*msaa)
| MeshPipelineViewLayoutKey::from(prepass_textures),
);
Expand Down

0 comments on commit 93d91cf

Please sign in to comment.