Kristian Høgsberg wrote: > On Thu, Aug 13, 2009 at 3:01 AM, Chia-I Wu<[email protected]> wrote: >> Hi all, >> >> While working on EGL and its drivers, I found that I always have to >> perform a lookup to convert an EGL handle (EGLDisplay, EGLContext, etc.) >> to its internal data structure (_EGLDisplay, _EGLContext, etc.). After >> the lookup, I also have to error check the result and set proper error >> code. >> >> Existing drivers sometime do not check the result, or do not to set the >> error code. Even the default implementation in EGL core forgets to do >> so here and there. I think it is a sign that lookup and error checking >> is better to be done in EGL core, or more specifically, in the EGL API >> entry points. > > Hi, > > I've been looking at the mesa egl implementation a bit too, with an > eye to merge eagle[1] into it. I'm also not happy with the > _EGLContext and the required lookups, but I'd like to take your idea > one step further and eliminate the lookups and the hash table > entirely. There is no need to do any lookups, the EGL types are > defined as void pointers, so we can just cast back to a struct > _EGLConfig or similar. That they're defined as void * instead of type > safe opaque structs is beyond me, but I digress. The EGL API is > defined like this so an implementation doesn't have to use hash > tables or the like. I don't know why mesa EGL uses a hash table, but > it's unecessary complexity that we should rather just get rid of.
I seem to recall that an earlier version of EGL defined EGLContext, EGLSurface, etc. as ints. But since they're pointers now, we should get rid of the hash table/lookups. I wasn't aware of eagle. It would be great to merge that into Mesa's EGL. -Brian ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
