mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 15:09:17 +01:00
Adjust gpfifo WFI to only do a pipeline barrier
This commit is contained in:
parent
2b282ece1a
commit
e2463b7619
@ -443,6 +443,17 @@ namespace skyline::gpu::interconnect {
|
||||
slot->nodes.emplace_back(std::in_place_type_t<node::FunctionNode>(), std::forward<decltype(function)>(function));
|
||||
}
|
||||
|
||||
void CommandExecutor::AddFullBarrier() {
|
||||
AddOutsideRpCommand([](vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &, GPU &) {
|
||||
commandBuffer.pipelineBarrier(
|
||||
vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, {}, vk::MemoryBarrier{
|
||||
.srcAccessMask = vk::AccessFlagBits::eMemoryRead | vk::AccessFlagBits::eMemoryWrite,
|
||||
.dstAccessMask = vk::AccessFlagBits::eMemoryRead | vk::AccessFlagBits::eMemoryWrite,
|
||||
}, {}, {}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
void CommandExecutor::AddClearColorSubpass(TextureView *attachment, const vk::ClearColorValue &value) {
|
||||
bool gotoNext{CreateRenderPassWithSubpass(vk::Rect2D{.extent = attachment->texture->dimensions}, {}, {}, attachment, nullptr)};
|
||||
if (renderPass->ClearColorAttachment(0, value, gpu)) {
|
||||
|
@ -284,6 +284,11 @@ namespace skyline::gpu::interconnect {
|
||||
*/
|
||||
void AddOutsideRpCommand(std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &)> &&function);
|
||||
|
||||
/**
|
||||
* @brief Adds a full pipeline barrier to the command buffer
|
||||
*/
|
||||
void AddFullBarrier();
|
||||
|
||||
/**
|
||||
* @brief Adds a persistent callback that will be called at the start of Execute in order to flush data required for recording
|
||||
*/
|
||||
|
@ -118,7 +118,7 @@ namespace skyline::soc::gm20b::engine {
|
||||
}
|
||||
})
|
||||
ENGINE_CASE(wfi, {
|
||||
channelCtx.executor.Submit();
|
||||
channelCtx.executor.AddFullBarrier();
|
||||
})
|
||||
ENGINE_CASE(setReference, {
|
||||
channelCtx.executor.Submit();
|
||||
|
Loading…
Reference in New Issue
Block a user