Implement EGL_ANGLE_sync_control_rate
This is the root cause to Chromium choppiness on XWayland with EGL backend using --use-gl=egl
.
https://bugs.chromium.org/p/chromium/issues/detail?id=1041228
The default desktop GL backend uses GLX_OML_sync_control
for GetVSyncValues()
and GetMsc()
methods to predict v-sync. For EGL backend, the EGL_CHROMIUM_sync_control
provides the implementation for GetVSyncValues()
and EGL_ANGLE_sync_control_rate
provides the implementation for GetMsc()
. MESA EGL implementation currently only provides EGL_CHROMIUM_sync_control
and Chromium fallback to an approximation replacement for GetMsc()
method that only works for X11 or XWayland-1.19.
Without EGL_CHROMIUM_sync_control
, Chromium hardcoded a 60Hz v-sync and that is the case with NVIDIA blobs on Linux.
EGL_ANGLE_sync_control_rate
specification is available at:
https://chromium.googlesource.com/chromium/src.git/+/refs/heads/master/gpu/GLES2/extensions/ANGLE/EGL_ANGLE_sync_control_rate.txt
Attached the patch rebased to MESA-master.
Update patch to include eglGetMscRateCHROMIUM
which simply piggyback on eglGetMscRateANGLE
. Current Chromium stable 81.4044.138 still use the eglGetMscRateCHROMIUM
and -use-gl=egl
caused GPU process crashed. Future Chromium will switch to the ANGLE version.