Skip to content

Commit

Permalink
vk: Don't send work to the GPU after every async upload
Browse files Browse the repository at this point in the history
- The purpose of this is to improve parallelism, but it triggers a driver bottleneck handling queue submits.
- There are much better ways to optimize job parallelism if it is indeed required.
  • Loading branch information
kd-11 committed Jul 24, 2022
1 parent 0ba0f9d commit cf99b84
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions rpcs3/Emu/RSX/VK/VKDraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,20 +386,12 @@ void VKGSRender::load_texture_env()
// We have to do this here, because we have to assume the CB will be dumped
auto& async_task_scheduler = g_fxo->get<vk::AsyncTaskScheduler>();

if (async_task_scheduler.is_recording())
if (async_task_scheduler.is_recording() && !async_task_scheduler.is_host_mode())
{
if (async_task_scheduler.is_host_mode())
// Sync any async scheduler tasks
if (auto ev = async_task_scheduler.get_primary_sync_label())
{
flush_command_queue();
ensure(!async_task_scheduler.is_recording());
}
else
{
// Sync any async scheduler tasks
if (auto ev = async_task_scheduler.get_primary_sync_label())
{
ev->gpu_wait(*m_current_command_buffer);
}
ev->gpu_wait(*m_current_command_buffer);
}
}
}
Expand Down

0 comments on commit cf99b84

Please sign in to comment.