mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-16 14:42:52 +00:00
Clear the UI after async shader compilation
This commit is contained in:
parent
dcad3ec892
commit
7faf5ea170
@ -159,10 +159,7 @@ void ShaderCache::WaitForAsyncCompiler()
|
|||||||
{
|
{
|
||||||
bool running = true;
|
bool running = true;
|
||||||
|
|
||||||
while (running &&
|
constexpr auto update_ui_progress = [](size_t completed, size_t total) {
|
||||||
(m_async_shader_compiler->HasPendingWork() || m_async_shader_compiler->HasCompletedWork()))
|
|
||||||
{
|
|
||||||
running = m_async_shader_compiler->WaitUntilCompletion([](size_t completed, size_t total) {
|
|
||||||
g_renderer->BeginUIFrame();
|
g_renderer->BeginUIFrame();
|
||||||
|
|
||||||
const float center_x = ImGui::GetIO().DisplaySize.x * 0.5f;
|
const float center_x = ImGui::GetIO().DisplaySize.x * 0.5f;
|
||||||
@ -185,9 +182,19 @@ void ShaderCache::WaitForAsyncCompiler()
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
g_renderer->EndUIFrame();
|
g_renderer->EndUIFrame();
|
||||||
});
|
};
|
||||||
|
|
||||||
|
while (running &&
|
||||||
|
(m_async_shader_compiler->HasPendingWork() || m_async_shader_compiler->HasCompletedWork()))
|
||||||
|
{
|
||||||
|
running = m_async_shader_compiler->WaitUntilCompletion(update_ui_progress);
|
||||||
|
|
||||||
m_async_shader_compiler->RetrieveWorkItems();
|
m_async_shader_compiler->RetrieveWorkItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Just render nothing to clear the screen
|
||||||
|
g_renderer->BeginUIFrame();
|
||||||
|
g_renderer->EndUIFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename SerializedUidType, typename UidType>
|
template <typename SerializedUidType, typename UidType>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user