mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-01 14:20:08 +01:00
- A few nagging issues remain, specifically that partial command stream largely caused by poor synchronization structures for partial CS flush and also the fact that occlusion map entries wait on a command buffer and not an EID!
37 lines
754 B
C++
37 lines
754 B
C++
#include "stdafx.h"
|
|
#include "VKCommandStream.h"
|
|
|
|
namespace vk
|
|
{
|
|
// global submit guard to prevent race condition on queue submit
|
|
shared_mutex g_submit_mutex;
|
|
|
|
void acquire_global_submit_lock()
|
|
{
|
|
g_submit_mutex.lock();
|
|
}
|
|
|
|
void release_global_submit_lock()
|
|
{
|
|
g_submit_mutex.unlock();
|
|
}
|
|
|
|
void queue_submit(VkQueue queue, const VkSubmitInfo* info, fence* pfence, VkBool32 flush)
|
|
{
|
|
if (!flush && g_cfg.video.multithreaded_rsx)
|
|
{
|
|
auto packet = new submit_packet(queue, pfence, info);
|
|
rsx::g_dma_manager.backend_ctrl(rctrl_queue_submit, packet);
|
|
}
|
|
else
|
|
{
|
|
acquire_global_submit_lock();
|
|
vkQueueSubmit(queue, 1, info, pfence->handle);
|
|
release_global_submit_lock();
|
|
|
|
// Signal fence
|
|
pfence->flushed = true;
|
|
}
|
|
}
|
|
}
|