Skip to content

Commit 89ad308

Browse files
committed
store PipelineSpecialization.dynamic_bindings in HashSet
1 parent ec8fd57 commit 89ad308

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/bevy_render/src/pipeline/pipeline_compiler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use serde::{Deserialize, Serialize};
1414
pub struct PipelineSpecialization {
1515
pub shader_specialization: ShaderSpecialization,
1616
pub primitive_topology: PrimitiveTopology,
17-
pub dynamic_bindings: Vec<String>,
17+
pub dynamic_bindings: HashSet<String>,
1818
pub index_format: IndexFormat,
1919
pub vertex_buffer_descriptor: VertexBufferDescriptor,
2020
pub sample_count: u32,

crates/bevy_render/src/pipeline/render_pipelines.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::{
88
use bevy_asset::{Assets, Handle};
99
use bevy_ecs::{Query, Res, ResMut};
1010
use bevy_property::Properties;
11+
use bevy_utils::HashSet;
1112

1213
#[derive(Debug, Properties, Default, Clone)]
1314
#[non_exhaustive]
@@ -111,7 +112,7 @@ pub fn draw_render_pipelines_system(
111112
.bindings
112113
.iter_dynamic_bindings()
113114
.map(|name| name.to_string())
114-
.collect::<Vec<String>>();
115+
.collect::<HashSet<String>>();
115116
pipeline.dynamic_bindings_generation =
116117
render_pipelines.bindings.dynamic_bindings_generation();
117118
}

0 commit comments

Comments
 (0)