iOS: Fix hang when task switching in GL mode

This commit is contained in:
Henrik Rydgård committed 2024-05-29 18:21:58 +02:00
1 parent f23f54bf87
commit 3065979528
3 files changed
+27 -1

No files matched your search

+10
View File
@@ -183,6 +183,16 @@ void GLRenderManager::StopThread() {
}
}
void GLRenderManager::StartThread() {
// There's not really a lot to do here anymore.
INFO_LOG(G3D, "GLRenderManager::StartThread()");
if (!runCompileThread_) {
runCompileThread_ = true;
} else {
INFO_LOG(G3D, "GL submission thread was already running.");
}
}
std::string GLRenderManager::GetGpuProfileString() const {
int curFrame = curFrame_;
const GLQueueProfileContext &profile = frameData_[curFrame].profile;
+2
View File
@@ -834,6 +834,7 @@ public:
}
}
void StartThread(); // Currently only used on iOS, since we fully recreate the context on Android
void StopThread();
bool SawOutOfMemory() {
@@ -873,6 +874,7 @@ private:
FastVec<GLRInitStep> initSteps_;
// Execution time state
// TODO: Rename this, as we don't actually use a compile thread on OpenGL.
bool runCompileThread_ = true;
// Thread is managed elsewhere, and should call ThreadFrame.