egl: move eglGetConfigAttrib() fallback to eglapi.c
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 21:31:00 +0000 (22:31 +0100)
committerEric Engestrom <eric@engestrom.ch>
Tue, 25 Jun 2019 06:36:54 +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 394207b91514eb13d70c5e558dc08a721e37163c..7309eb08d1c2b49b0963ea88f4a394a7807be56b 100644 (file)
@@ -772,7 +772,11 @@ eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
    _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
 
    _EGL_CHECK_CONFIG(disp, conf, EGL_FALSE, drv);
-   ret = drv->API.GetConfigAttrib(drv, disp, conf, attribute, value);
+
+   if (drv->API.GetConfigAttrib)
+      ret = drv->API.GetConfigAttrib(drv, disp, conf, attribute, value);
+   else
+      ret = _eglGetConfigAttrib(drv, disp, conf, attribute, value);
 
    RETURN_EGL_EVAL(disp, ret);
 }
index f2c8bc43bddde57224058a68b2278da10ec922e4..1e679625934a98e1182db9b73802693cab3fc560 100644 (file)
@@ -42,8 +42,6 @@
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   drv->API.GetConfigAttrib = _eglGetConfigAttrib;
-
    drv->API.QueryContext = _eglQueryContext;
 
    drv->API.QuerySurface = _eglQuerySurface;