Skip to content

Commit

Permalink
Support rendering to a different subpass in yakui-vulkan (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
patowen authored May 5, 2024
1 parent 2eda113 commit cbac6c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/yakui-vulkan/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub struct Options {
pub dynamic_rendering_format: Option<vk::Format>,
/// Render pass that the GUI will be drawn in. Ignored if `dynamic_rendering_format` is set.
pub render_pass: vk::RenderPass,
/// Subpass that the GUI will be drawn in. Ignored if `dynamic_rendering_format` is set.
pub subpass: u32,
}

#[derive(Clone, Copy, Debug)]
Expand Down Expand Up @@ -319,7 +321,9 @@ impl YakuiVulkan {
.color_attachment_formats(&rendering_info_formats);
graphic_pipeline_info = graphic_pipeline_info.push_next(&mut rendering_info);
} else {
graphic_pipeline_info = graphic_pipeline_info.render_pass(options.render_pass);
graphic_pipeline_info = graphic_pipeline_info
.render_pass(options.render_pass)
.subpass(options.subpass);
}

let graphics_pipelines = unsafe {
Expand Down

0 comments on commit cbac6c0

Please sign in to comment.