GPUThread: Fix input OSD with threaded rendering off

This commit is contained in:
Stenzek 2025-01-16 21:38:45 +10:00
parent f6f709bcc5
commit 074a8a2653
No known key found for this signature in database
3 changed files with 15 additions and 1 deletions

View File

@ -1013,6 +1013,19 @@ std::pair<GPUThreadCommand*, void*> GPUThread::BeginASyncBufferCall(AsyncBufferC
return std::make_pair(static_cast<GPUThreadCommand*>(cmd), buffer);
}
void GPUThread::EndASyncBufferCall(GPUThreadCommand* cmd)
{
if (!s_state.use_gpu_thread) [[unlikely]]
{
GPUThreadAsyncCallCommand* const acmd = static_cast<GPUThreadAsyncCallCommand*>(cmd);
acmd->func();
acmd->~GPUThreadAsyncCallCommand();
return;
}
PushCommand(cmd);
}
void GPUThread::UpdateSettings(bool gpu_settings_changed, bool device_settings_changed)
{
if (device_settings_changed)

View File

@ -73,6 +73,7 @@ bool IsUsingThread();
void RunOnThread(AsyncCallType func);
void RunOnBackend(AsyncBackendCallType func, bool sync, bool spin_or_wake);
std::pair<GPUThreadCommand*, void*> BeginASyncBufferCall(AsyncBufferCallType func, u32 buffer_size);
void EndASyncBufferCall(GPUThreadCommand* cmd);
void SetVSync(GPUVSyncMode mode, bool allow_present_throttle);
// Should only be called on the GPU thread.

View File

@ -729,7 +729,7 @@ void ImGuiManager::UpdateInputOverlay()
}
}
GPUThread::PushCommand(cmd);
GPUThread::EndASyncBufferCall(cmd);
}
void ImGuiManager::UpdateInputOverlay(void* buffer)