|
|
|
|
@ -1151,6 +1151,8 @@ void VideoThread::UpdateSettingsOnThread(GPUSettings&& new_settings)
|
|
|
|
|
|
|
|
|
|
void VideoThread::RunOnThread(AsyncCallType func)
|
|
|
|
|
{
|
|
|
|
|
DebugAssert(!VideoThread::IsOnThread());
|
|
|
|
|
|
|
|
|
|
if (!s_state.use_thread) [[unlikely]]
|
|
|
|
|
{
|
|
|
|
|
func();
|
|
|
|
|
@ -1164,6 +1166,8 @@ void VideoThread::RunOnThread(AsyncCallType func)
|
|
|
|
|
|
|
|
|
|
void VideoThread::RunOnThreadAndSync(AsyncCallType func)
|
|
|
|
|
{
|
|
|
|
|
DebugAssert(!VideoThread::IsOnThread());
|
|
|
|
|
|
|
|
|
|
if (!s_state.use_thread) [[unlikely]]
|
|
|
|
|
{
|
|
|
|
|
func();
|
|
|
|
|
@ -1177,6 +1181,8 @@ void VideoThread::RunOnThreadAndSync(AsyncCallType func)
|
|
|
|
|
|
|
|
|
|
std::pair<VideoThreadCommand*, void*> VideoThread::BeginASyncBufferCall(AsyncBufferCallType func, u32 buffer_size)
|
|
|
|
|
{
|
|
|
|
|
DebugAssert(!VideoThread::IsOnThread());
|
|
|
|
|
|
|
|
|
|
// this is less than optimal, but it's only used for input osd updates currently, so whatever
|
|
|
|
|
VideoThreadAsyncBufferCallCommand* const cmd = AllocateCommand<VideoThreadAsyncBufferCallCommand>(
|
|
|
|
|
sizeof(VideoThreadAsyncBufferCallCommand) + buffer_size, VideoThreadCommandType::AsyncBufferCall, func);
|
|
|
|
|
@ -1186,6 +1192,8 @@ std::pair<VideoThreadCommand*, void*> VideoThread::BeginASyncBufferCall(AsyncBuf
|
|
|
|
|
|
|
|
|
|
void VideoThread::EndASyncBufferCall(VideoThreadCommand* cmd)
|
|
|
|
|
{
|
|
|
|
|
DebugAssert(!VideoThread::IsOnThread());
|
|
|
|
|
|
|
|
|
|
if (!s_state.use_thread) [[unlikely]]
|
|
|
|
|
{
|
|
|
|
|
VideoThreadAsyncBufferCallCommand* const acmd = static_cast<VideoThreadAsyncBufferCallCommand*>(cmd);
|
|
|
|
|
|