Browse Source

[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>
pull/2747/head
Ribbit 2 months ago
committed by crueter
parent
commit
f273ac446b
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 5
      src/video_core/renderer_vulkan/vk_master_semaphore.cpp

5
src/video_core/renderer_vulkan/vk_master_semaphore.cpp

@ -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{ 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, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
}; };

Loading…
Cancel
Save