libobs-opengl: Specify display attributes

This is functionally a no-op, but works around a driver bug that
prevents use of eglQueryDisplayAttribEXT. This makes us more likely to
not trigger the driver bug and that gs_enum_adapters works correctly.
This commit is contained in:
Kurt Kartaltepe 2024-01-31 19:44:05 -08:00 committed by Lain
parent b6e2face96
commit d2e50c8c38
2 changed files with 5 additions and 2 deletions

View file

@ -190,7 +190,9 @@ static struct gl_platform *gl_wayland_egl_platform_create(gs_device_t *device,
device->plat = plat;
plat->display = eglGetDisplay(plat->wl_display);
const EGLAttrib plat_attribs[] = {EGL_NONE};
plat->display = eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT,
plat->wl_display, plat_attribs);
if (plat->display == EGL_NO_DISPLAY) {
blog(LOG_ERROR, "eglGetDisplay failed");
goto fail_display_init;

View file

@ -155,8 +155,9 @@ static EGLDisplay get_egl_display(struct gl_platform *plat)
: NULL);
if (eglGetPlatformDisplayEXT) {
const EGLint plat_attribs[] = {EGL_NONE};
edisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_X11_EXT,
display, NULL);
display, plat_attribs);
if (EGL_NO_DISPLAY == edisplay)
blog(LOG_ERROR, "Failed to get EGL/X11 display");
}