Commit e3c995d9 authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

wgl: fold GLES* extension checking

In reality, any implementation which has EXT_create_context_es2_profile will
also implement EXT_create_context_es_profile, and vice-versa.

Drop the over-verbose checks with a single that works across ES1, ES2 and ES3
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Tested-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
parent 1357ac4a
Pipeline #101904 passed with stages
in 1 minute and 53 seconds
......@@ -107,32 +107,14 @@ wgl_config_check_context_attrs(struct wgl_display *dpy,
return true;
case WAFFLE_CONTEXT_OPENGL_ES1:
if (!dpy->EXT_create_context_es_profile) {
wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
"WGL_EXT_create_context_es_profile is required "
"to create an OpenGL ES1 context");
return false;
}
return true;
case WAFFLE_CONTEXT_OPENGL_ES2:
if (!dpy->EXT_create_context_es2_profile
&& !dpy->EXT_create_context_es_profile) {
case WAFFLE_CONTEXT_OPENGL_ES3:
if (!dpy->EXT_create_context_es_profile &&
!dpy->EXT_create_context_es2_profile) {
wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
"WGL_EXT_create_context_es_profile or "
"WGL_EXT_create_context_es2_profile is required "
"to create an OpenGL ES2 context");
return false;
}
return true;
case WAFFLE_CONTEXT_OPENGL_ES3:
if (!dpy->EXT_create_context_es_profile) {
wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
"WGL_EXT_create_context_es_profile is required "
"to create an OpenGL ES3 context");
"to create an OpenGL ES* context");
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment