From c654987ae359dcd2b396dcb6ece30d851395d135 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sun, 21 Jun 2020 18:55:22 -0700 Subject: [PATCH] fix bug where pipelines used unspecialized shaders --- crates/bevy_render/src/pipeline/pipeline_compiler.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/crates/bevy_render/src/pipeline/pipeline_compiler.rs b/crates/bevy_render/src/pipeline/pipeline_compiler.rs index 0513255b6d..efa9dfa0a6 100644 --- a/crates/bevy_render/src/pipeline/pipeline_compiler.rs +++ b/crates/bevy_render/src/pipeline/pipeline_compiler.rs @@ -145,16 +145,9 @@ impl PipelineCompiler { Some(vertex_buffer_descriptors), &pipeline_specialization.dynamic_bindings, ); - specialized_descriptor.primitive_topology = pipeline_specialization.primitive_topology; - let specialized_pipeline_handle = - if *pipeline_specialization == PipelineSpecialization::default() { - pipelines.set(source_pipeline, specialized_descriptor); - source_pipeline - } else { - pipelines.add(specialized_descriptor) - }; + let specialized_pipeline_handle = pipelines.add(specialized_descriptor); render_resource_context.create_render_pipeline( specialized_pipeline_handle, pipelines.get(&specialized_pipeline_handle).unwrap(),