Skip to content
Snippets Groups Projects
Commit 03d5920a authored by Simon McVittie's avatar Simon McVittie
Browse files

graphics: Only allow EGL_X11 with a GL-based rendering interface


EGL is specifically for OpenGL and OpenGL ES, so when we add Vulkan
(or, hypothetically, other rendering interfaces), it would make no
sense to request EGL_X11 in combination with a non-GL-based window
system. The only combination that makes sense for Vulkan in the short
term is (X11, VULKAN); if we later add support for non-X11 windowing
systems like Wayland, then (WAYLAND, VULKAN) would also make sense.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 1234c545
No related branches found
No related tags found
1 merge request!47Add more preconditions for window system/rendering interface combinations
...@@ -308,7 +308,19 @@ _srt_check_graphics (const char *helpers_path, ...@@ -308,7 +308,19 @@ _srt_check_graphics (const char *helpers_path,
} }
else if (window_system == SRT_WINDOW_SYSTEM_EGL_X11) else if (window_system == SRT_WINDOW_SYSTEM_EGL_X11)
{ {
platformstring = g_strdup ("x11_egl"); if (rendering_interface == SRT_RENDERING_INTERFACE_GL
|| rendering_interface == SRT_RENDERING_INTERFACE_GLESV2)
{
platformstring = g_strdup ("x11_egl");
}
else
{
/* e.g. Vulkan (when implemented) */
g_critical ("EGL window system only makes sense with a GL-based "
"rendering interface, not %d",
rendering_interface);
g_return_val_if_reached (SRT_GRAPHICS_ISSUES_INTERNAL_ERROR);
}
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment