Change AddNonGraphicsPass to AddOutsideRpCommand

The terminology "Non-Graphics pass" was deemed to be fairly inaccurate since it simply covered all Vulkan commands (not "passes") outside the render-pass scope, these may be graphical operations such as blits and therefore it is more accurate to use the new terminology of "Outside-RenderPass command" due to the lack of such an implication while being consistent with the Vulkan specification.
This commit is contained in:
PixelyIon 2022-04-14 14:08:41 +05:30
parent a31332e35f
commit 624df92616
3 changed files with 20 additions and 20 deletions

View File

@ -53,14 +53,14 @@ namespace skyline::gpu::interconnect {
bool newRenderPass{CreateRenderPass(renderArea)}; bool newRenderPass{CreateRenderPass(renderArea)};
renderPass->AddSubpass(inputAttachments, colorAttachments, depthStencilAttachment ? &*depthStencilAttachment : nullptr); renderPass->AddSubpass(inputAttachments, colorAttachments, depthStencilAttachment ? &*depthStencilAttachment : nullptr);
if (newRenderPass) if (newRenderPass)
nodes.emplace_back(std::in_place_type_t<node::SubpassFunctionNode>(), std::forward<std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &, vk::RenderPass, u32)>>(function)); nodes.emplace_back(std::in_place_type_t<node::SubpassFunctionNode>(), std::forward<decltype(function)>(function));
else else
nodes.emplace_back(std::in_place_type_t<node::NextSubpassFunctionNode>(), std::forward<std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &, vk::RenderPass, u32)>>(function)); nodes.emplace_back(std::in_place_type_t<node::NextSubpassFunctionNode>(), std::forward<decltype(function)>(function));
} }
void CommandExecutor::AddNonGraphicsPass(std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &)> &&function) { void CommandExecutor::AddOutsideRpCommand(std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &)> &&function) {
// End render pass
if (renderPass) { if (renderPass) {
// End render pass, if we're in one
nodes.emplace_back(std::in_place_type_t<node::RenderPassEndNode>()); nodes.emplace_back(std::in_place_type_t<node::RenderPassEndNode>());
renderPass = nullptr; renderPass = nullptr;
subpassCount = 0; subpassCount = 0;

View File

@ -74,9 +74,9 @@ namespace skyline::gpu::interconnect {
void AddClearDepthStencilSubpass(TextureView *attachment, const vk::ClearDepthStencilValue &value); 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 * @brief Adds a command that needs to be executed outside the scope of a render pass
*/ */
void AddNonGraphicsPass(std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &)> &&function); void AddOutsideRpCommand(std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &)> &&function);
/** /**
* @brief Execute all the nodes and submit the resulting command buffer to the GPU * @brief Execute all the nodes and submit the resulting command buffer to the GPU

View File

@ -714,7 +714,7 @@ namespace skyline::gpu::interconnect {
auto constantBuffer{GetConstantBufferSelector().value()}; auto constantBuffer{GetConstantBufferSelector().value()};
constantBuffer.Write(data, offset); constantBuffer.Write(data, offset);
executor.AddNonGraphicsPass([view = constantBuffer.view, data, offset](vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &cycle, GPU &) { executor.AddOutsideRpCommand([view = constantBuffer.view, data, offset](vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &cycle, GPU &) {
std::scoped_lock lock{view}; std::scoped_lock lock{view};
commandBuffer.updateBuffer<u32>(view.bufferDelegate->buffer->GetBacking(), offset, vk::ArrayProxy(1, &data)); commandBuffer.updateBuffer<u32>(view.bufferDelegate->buffer->GetBacking(), offset, vk::ArrayProxy(1, &data));
}); });