[Mesa-dev] [PATCH mesa 8/8] eglapi: replace linear entrypoint search with binary search

Eric Engestrom eric at engestrom.ch
Sun Feb 19 23:54:47 UTC 2017


On Sunday, 2017-02-19 15:38:05 -0800, Matt Turner wrote:
> On Sun, Feb 19, 2017 at 3:23 PM, Eric Engestrom <eric at engestrom.ch> wrote:
> > Tested with dEQP-EGL.functional.get_proc_address.*
> >
> > Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> > ---
> >  src/egl/main/eglapi.c | 37 ++++++++++++++++++++++++-------------
> >  1 file changed, 24 insertions(+), 13 deletions(-)
> >
> > diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
> > index 1038916cd2..b6a5b1c978 100644
> > --- a/src/egl/main/eglapi.c
> > +++ b/src/egl/main/eglapi.c
> > @@ -157,6 +157,12 @@
> >     _EGL_CHECK_OBJECT(disp, Sync, s, ret, drv)
> >
> >
> > +struct _egl_entrypoint {
> > +   const char *name;
> > +   _EGLProc function;
> > +};
> > +
> > +
> >  static inline _EGLDriver *
> >  _eglCheckDisplay(_EGLDisplay *disp, const char *msg)
> >  {
> > @@ -2350,34 +2356,39 @@ eglQueryDebugKHR(EGLint attribute, EGLAttrib *value)
> >     return EGL_TRUE;
> >  }
> >
> > +static int
> > +_eglFunctionCompare(const void *key, const void *elem)
> > +{
> > +   const char* procname = key;
> > +   const struct _egl_entrypoint* entrypoint = elem;
> 
> * goes with variable name

Fixed up locally, thanks.


More information about the mesa-dev mailing list