egl: move eglQueryContext() fallback to eglapi.c
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 21:31:26 +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 7309eb08d1c2b49b0963ea88f4a394a7807be56b..32951c96c0fd6965d41e9f78f4776f3ea4ca54b0 100644 (file)
@@ -900,7 +900,11 @@ eglQueryContext(EGLDisplay dpy, EGLContext ctx,
    _EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
 
    _EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
-   ret = drv->API.QueryContext(drv, disp, context, attribute, value);
+
+   if (drv->API.QueryContext)
+      ret = drv->API.QueryContext(drv, disp, context, attribute, value);
+   else
+      ret = _eglQueryContext(drv, disp, context, attribute, value);
 
    RETURN_EGL_EVAL(disp, ret);
 }
index 1e679625934a98e1182db9b73802693cab3fc560..135c9c1229cfcd58e26e7213037e54abd5ccef5f 100644 (file)
@@ -42,8 +42,6 @@
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   drv->API.QueryContext = _eglQueryContext;
-
    drv->API.QuerySurface = _eglQuerySurface;
    drv->API.SurfaceAttrib = _eglSurfaceAttrib;