[vk] Tighten queue wait stages (#2734)
Wait only at the transfer and color stages instead of every stage. That keeps things in sync without stalling the whole GPU. This should work according to spec, just need to test and verify no regressions across all platforms (Windows, Linux, Android, Mac OS) Can be 0.0.4 or 0.0.5 up to the team. Co-authored-by: Ribbit <ribbit@placeholder.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2734 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Co-authored-by: Ribbit <ribbit@eden-emu.dev> Co-committed-by: Ribbit <ribbit@eden-emu.dev>
This commit is contained in:
@@ -114,8 +114,11 @@ VkResult MasterSemaphore::SubmitQueue(vk::CommandBuffer& cmdbuf, vk::CommandBuff
|
||||
}
|
||||
}
|
||||
|
||||
// Use precise wait stages instead of ALL_COMMANDS to avoid pipeline-wide stalls.
|
||||
// First entry is used for external acquire waits; we wait at transfer and color output stages
|
||||
// because this submit contains an upload cmd buffer and a render cmd buffer.
|
||||
static constexpr std::array<VkPipelineStageFlags, 2> wait_stage_masks{
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user