From 7b0af11a7d8154d0997a38de2568e6b88f109474 Mon Sep 17 00:00:00 2001 From: Patrick Owen Date: Sat, 4 May 2024 21:21:04 -0400 Subject: [PATCH] Support rendering to a different subpass in yakui-vulkan --- crates/yakui-vulkan/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/yakui-vulkan/src/lib.rs b/crates/yakui-vulkan/src/lib.rs index 935202e9..28468fd2 100644 --- a/crates/yakui-vulkan/src/lib.rs +++ b/crates/yakui-vulkan/src/lib.rs @@ -72,6 +72,8 @@ pub struct Options { pub dynamic_rendering_format: Option, /// 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)] @@ -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 {