mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 03:32:55 +00:00
vk: Support new fxo usage pattern
This commit is contained in:
parent
b4e821c28d
commit
585837a3f0
@ -152,7 +152,7 @@ namespace vk
|
||||
|
||||
void AsyncTaskScheduler::kill()
|
||||
{
|
||||
*g_fxo->get<async_scheduler_thread>() = thread_state::aborting;
|
||||
g_fxo->get<async_scheduler_thread>() = thread_state::aborting;
|
||||
while (has_refs()) _mm_pause();
|
||||
|
||||
for (auto& cb : m_async_command_queue)
|
||||
|
@ -963,7 +963,7 @@ void VKGSRender::end()
|
||||
m_frame_stats.setup_time += m_profiler.duration();
|
||||
|
||||
// Sync any async scheduler tasks
|
||||
if (auto ev = g_fxo->get<vk::async_scheduler_thread>()->get_primary_sync_label())
|
||||
if (auto ev = g_fxo->get<vk::async_scheduler_thread>().get_primary_sync_label())
|
||||
{
|
||||
ev->gpu_wait(*m_current_command_buffer);
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ VKGSRender::~VKGSRender()
|
||||
}
|
||||
|
||||
// Globals. TODO: Refactor lifetime management
|
||||
g_fxo->get<vk::async_scheduler_thread>()->kill();
|
||||
g_fxo->get<vk::async_scheduler_thread>().kill();
|
||||
|
||||
//Wait for device to finish up with resources
|
||||
vkDeviceWaitIdle(*m_device);
|
||||
@ -1939,7 +1939,7 @@ void VKGSRender::close_and_submit_command_buffer(vk::fence* pFence, VkSemaphore
|
||||
const VkBool32 force_flush = !sync_success;
|
||||
|
||||
// Flush any asynchronously scheduled jobs
|
||||
g_fxo->get<vk::async_scheduler_thread>()->flush(force_flush);
|
||||
g_fxo->get<vk::async_scheduler_thread>().flush(force_flush);
|
||||
|
||||
if (vk::test_status_interrupt(vk::heap_dirty))
|
||||
{
|
||||
|
@ -803,7 +803,7 @@ namespace vk
|
||||
const vk::command_buffer* pcmd = nullptr;
|
||||
if (flags & image_upload_options::upload_contents_async)
|
||||
{
|
||||
auto async_cmd = g_fxo->get<vk::async_scheduler_thread>()->get_current();
|
||||
auto async_cmd = g_fxo->get<vk::async_scheduler_thread>().get_current();
|
||||
async_cmd->begin();
|
||||
pcmd = async_cmd;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user