[Merge] (P11): origin feat/disaggregated@86dc38a0 - its eglSwapInterval port is dev c60639db (already merged) plus ForgetRequestedSwapInterval, so an ended Magma server session no longer hands its interval to the next

This commit is contained in:
2026-09-29 08:05:57 -04:00
3 changed files with 16 additions and 0 deletions
@@ -345,6 +345,10 @@ namespace MobileGL::MG_Backend::DirectVulkan {
pVulkanRenderer.reset();
ClearProgramResourceCaches();
}
// And the swap interval it asked for (DirectVulkan.h).
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) {
ForgetRequestedSwapInterval();
}
}
#else
BackendObject_DirectVulkan::~BackendObject_DirectVulkan() = default;
@@ -1756,4 +1756,10 @@ namespace MobileGL::MG_Backend::DirectVulkan {
Optional<Int> GetRequestedSwapInterval() {
return g_requestedSwapInterval;
}
#if MOBILEGL_BUILD_DISAGGREGATED
void ForgetRequestedSwapInterval() {
g_requestedSwapInterval.reset();
}
#endif
} // namespace MobileGL::MG_Backend::DirectVulkan
@@ -151,4 +151,10 @@ namespace MobileGL::MG_Backend::DirectVulkan {
// starts from the app's last request (GetRequestedSwapInterval) instead of the default.
void SetSwapInterval(Int interval);
Optional<Int> GetRequestedSwapInterval();
#if MOBILEGL_BUILD_DISAGGREGATED
// The swap interval an ended server session asked for is not the next one's, the same rule as
// DirectGLES::ForgetRequestedSwapInterval: under a transport ~BackendObject_DirectVulkan forgets
// it, so the next session starts at the default until it asks.
void ForgetRequestedSwapInterval();
#endif
} // namespace MobileGL::MG_Backend::DirectVulkan