mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 20:15:32 +00:00
PostProcessing: Fix abort on slow compile in big picture
This commit is contained in:
parent
5060e72b96
commit
dc6d6b91d4
@ -8513,6 +8513,11 @@ LoadingScreenProgressCallback::LoadingScreenProgressCallback()
|
||||
}
|
||||
|
||||
LoadingScreenProgressCallback::~LoadingScreenProgressCallback()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
void LoadingScreenProgressCallback::Close()
|
||||
{
|
||||
// Did we activate?
|
||||
if (m_last_progress_percent < 0)
|
||||
@ -8531,6 +8536,8 @@ LoadingScreenProgressCallback::~LoadingScreenProgressCallback()
|
||||
// since this was pushing frames, we need to restore the context. do that by pushing a frame ourselves
|
||||
GPUThread::Internal::PresentFrameAndRestoreContext();
|
||||
}
|
||||
|
||||
m_last_progress_percent = -1;
|
||||
}
|
||||
|
||||
void LoadingScreenProgressCallback::PushState()
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
|
||||
ALWAYS_INLINE void SetOpenDelay(float delay) { m_open_delay = delay; }
|
||||
|
||||
void Close();
|
||||
|
||||
void PushState() override;
|
||||
void PopState() override;
|
||||
|
||||
|
@ -432,11 +432,11 @@ void PostProcessing::Chain::LoadStages(std::unique_lock<std::mutex>& settings_lo
|
||||
return;
|
||||
}
|
||||
|
||||
progress.IncrementProgressValue();
|
||||
|
||||
settings_lock.lock();
|
||||
shader->LoadOptions(si, GetStageConfigSection(m_section, i));
|
||||
m_stages.push_back(std::move(shader));
|
||||
|
||||
progress.IncrementProgressValue();
|
||||
}
|
||||
|
||||
if (stage_count > 0)
|
||||
@ -455,6 +455,11 @@ void PostProcessing::Chain::LoadStages(std::unique_lock<std::mutex>& settings_lo
|
||||
m_needs_depth_buffer = m_enabled && m_wants_depth_buffer;
|
||||
if (m_wants_depth_buffer)
|
||||
DEV_LOG("Depth buffer is needed.");
|
||||
|
||||
// can't close/redraw with settings lock held because big picture
|
||||
settings_lock.unlock();
|
||||
progress.Close();
|
||||
settings_lock.lock();
|
||||
}
|
||||
|
||||
void PostProcessing::Chain::UpdateSettings(std::unique_lock<std::mutex>& settings_lock, const SettingsInterface& si)
|
||||
@ -531,6 +536,11 @@ void PostProcessing::Chain::UpdateSettings(std::unique_lock<std::mutex>& setting
|
||||
m_needs_depth_buffer = m_enabled && m_wants_depth_buffer;
|
||||
if (m_wants_depth_buffer)
|
||||
DEV_LOG("Depth buffer is needed.");
|
||||
|
||||
// can't close/redraw with settings lock held because big picture
|
||||
settings_lock.unlock();
|
||||
progress.Close();
|
||||
settings_lock.lock();
|
||||
}
|
||||
|
||||
void PostProcessing::Chain::Toggle()
|
||||
|
Loading…
x
Reference in New Issue
Block a user