ui/egl: default to GLES on windows
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 6 Jun 2023 11:56:50 +0000 (15:56 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 27 Jun 2023 15:08:56 +0000 (17:08 +0200)
Windows GL drivers are notoriously not very good. Otoh, ANGLE provides
rock solid GLES implementation on top of direct3d. We should recommend
it and default to ES when using EGL (users can easily override this if
necessary)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230606115658.677673-14-marcandre.lureau@redhat.com>

ui/egl-helpers.c

index d1ef3c07dd5c5b976e6bb8630f4ea1e5dc01a6cd..c2a3ace743dd7baf7337e3c486eb931d6b134d06 100644 (file)
@@ -535,6 +535,10 @@ int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode)
 #ifdef WIN32
 int qemu_egl_init_dpy_win32(EGLNativeDisplayType dpy, DisplayGLMode mode)
 {
+    /* prefer GL ES, as that's what ANGLE supports */
+    if (mode == DISPLAYGL_MODE_ON) {
+        mode = DISPLAYGL_MODE_ES;
+    }
     return qemu_egl_init_dpy(dpy, 0, mode);
 }
 #endif