Kill current render pass only when custom pipelines are present in layer
This commit is contained in:
parent
34b5cb75ef
commit
fee3bf0df4
1 changed files with 20 additions and 22 deletions
|
|
@ -323,10 +323,9 @@ impl Backend {
|
||||||
text_layer += 1;
|
text_layer += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// kill render pass to let custom shaders get mut access to encoder
|
if !layer.pipelines.is_empty() {
|
||||||
let _ = ManuallyDrop::into_inner(render_pass);
|
let _ = ManuallyDrop::into_inner(render_pass);
|
||||||
|
|
||||||
if !layer.pipelines.is_empty() {
|
|
||||||
for pipeline in &layer.pipelines {
|
for pipeline in &layer.pipelines {
|
||||||
let bounds = (pipeline.bounds * scale_factor).snap();
|
let bounds = (pipeline.bounds * scale_factor).snap();
|
||||||
|
|
||||||
|
|
@ -342,9 +341,7 @@ impl Backend {
|
||||||
encoder,
|
encoder,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// recreate and continue processing layers
|
|
||||||
render_pass = ManuallyDrop::new(encoder.begin_render_pass(
|
render_pass = ManuallyDrop::new(encoder.begin_render_pass(
|
||||||
&wgpu::RenderPassDescriptor {
|
&wgpu::RenderPassDescriptor {
|
||||||
label: Some("iced_wgpu::quad render pass"),
|
label: Some("iced_wgpu::quad render pass"),
|
||||||
|
|
@ -364,6 +361,7 @@ impl Backend {
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let _ = ManuallyDrop::into_inner(render_pass);
|
let _ = ManuallyDrop::into_inner(render_pass);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue