Skip to content

Commit

Permalink
store PipelineSpecialization.dynamic_bindings in HashSet (bevyengine#936
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mrk-its authored Nov 28, 2020
1 parent 097a559 commit dbf226b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_render/src/pipeline/pipeline_compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use serde::{Deserialize, Serialize};
pub struct PipelineSpecialization {
pub shader_specialization: ShaderSpecialization,
pub primitive_topology: PrimitiveTopology,
pub dynamic_bindings: Vec<String>,
pub dynamic_bindings: HashSet<String>,
pub index_format: IndexFormat,
pub vertex_buffer_descriptor: VertexBufferDescriptor,
pub sample_count: u32,
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_render/src/pipeline/render_pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
use bevy_asset::{Assets, Handle};
use bevy_ecs::{Query, Res, ResMut};
use bevy_reflect::Reflect;
use bevy_utils::HashSet;

#[derive(Debug, Default, Clone, Reflect)]
pub struct RenderPipeline {
Expand Down Expand Up @@ -110,7 +111,7 @@ pub fn draw_render_pipelines_system(
.bindings
.iter_dynamic_bindings()
.map(|name| name.to_string())
.collect::<Vec<String>>();
.collect::<HashSet<String>>();
pipeline.dynamic_bindings_generation =
render_pipelines.bindings.dynamic_bindings_generation();
}
Expand Down

0 comments on commit dbf226b

Please sign in to comment.