mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-22 04:25:19 +00:00
vk: Add an alternate async queue scheduler
- This version violates spec but does not rely on CPU threads to keep the GPU from hanging. It's ironically much safer to use.
This commit is contained in:
parent
bd6c187fcd
commit
48d0f80a86
1 changed files with 16 additions and 2 deletions
|
@ -8,10 +8,15 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#define WITH_CPU_SCHEDULER 1
|
||||
|
||||
namespace vk
|
||||
{
|
||||
void AsyncTaskScheduler::operator()()
|
||||
{
|
||||
#if WITH_CPU_SCHEDULER
|
||||
thread_ctrl::set_native_priority(1);
|
||||
|
||||
add_ref();
|
||||
|
||||
while (thread_ctrl::state() != thread_state::aborting)
|
||||
|
@ -24,6 +29,7 @@ namespace vk
|
|||
}
|
||||
|
||||
release();
|
||||
#endif
|
||||
}
|
||||
|
||||
void AsyncTaskScheduler::delayed_init()
|
||||
|
@ -61,8 +67,16 @@ namespace vk
|
|||
|
||||
sync_label->queue1_signal->signal(*m_current_cb, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0);
|
||||
|
||||
m_event_queue.push(sync_label);
|
||||
m_sync_label = sync_label->queue2_signal.get();
|
||||
#if WITH_CPU_SCHEDULER
|
||||
{
|
||||
m_event_queue.push(sync_label);
|
||||
m_sync_label = sync_label->queue2_signal.get();
|
||||
}
|
||||
#else
|
||||
{
|
||||
m_sync_label = sync_label->queue1_signal.get();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
AsyncTaskScheduler::~AsyncTaskScheduler()
|
||||
|
|
Loading…
Add table
Reference in a new issue