diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp index 29ba9b54..33db9783 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp @@ -58,6 +58,17 @@ namespace skyline::gpu::interconnect { nodes.emplace_back(std::in_place_type_t(), std::forward &, GPU &, vk::RenderPass, u32)>>(function)); } + void CommandExecutor::AddNonGraphicsPass(std::function &, GPU &)> &&function) { + // End render pass + if (renderPass) { + nodes.emplace_back(std::in_place_type_t()); + renderPass = nullptr; + subpassCount = 0; + } + + nodes.emplace_back(std::in_place_type_t(), std::forward(function)); + } + void CommandExecutor::AddClearColorSubpass(TextureView *attachment, const vk::ClearColorValue &value) { bool newRenderPass{CreateRenderPass(vk::Rect2D{ .extent = attachment->texture->dimensions, diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h index 3388cd7b..5c624e75 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h @@ -73,6 +73,11 @@ namespace skyline::gpu::interconnect { */ void AddClearDepthStencilSubpass(TextureView *attachment, const vk::ClearDepthStencilValue &value); + /** + * @brief Adds a non graphics pass that can be used to execute arbitrary commands outside of a render pass + */ + void AddNonGraphicsPass(std::function &, GPU &)> &&function); + /** * @brief Execute all the nodes and submit the resulting command buffer to the GPU */