egl: move eglChooseConfig() fallback to eglapi.c
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 21:30:23 +0000 (22:30 +0100)
committerEric Engestrom <eric@engestrom.ch>
Tue, 25 Jun 2019 06:36:53 +0000 (06:36 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/egl/main/eglapi.c
src/egl/main/eglfallbacks.c

index 8f3e741ebc4e3819601879172ec25c867b10a0cb..394207b91514eb13d70c5e558dc08a721e37163c 100644 (file)
@@ -749,8 +749,12 @@ eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs,
    if (!num_config)
       RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
 
-   ret = drv->API.ChooseConfig(drv, disp, attrib_list, configs,
-                               config_size, num_config);
+   if (drv->API.ChooseConfig)
+      ret = drv->API.ChooseConfig(drv, disp, attrib_list, configs,
+                                  config_size, num_config);
+   else
+      ret = _eglChooseConfig(drv, disp, attrib_list, configs,
+                             config_size, num_config);
 
    RETURN_EGL_EVAL(disp, ret);
 }
index 696a08c56db7c79a8c4ff3c8452ca9efb0464d72..f2c8bc43bddde57224058a68b2278da10ec922e4 100644 (file)
@@ -42,7 +42,6 @@
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   drv->API.ChooseConfig = _eglChooseConfig;
    drv->API.GetConfigAttrib = _eglGetConfigAttrib;
 
    drv->API.QueryContext = _eglQueryContext;