Kristian Høgsberg wrote:
This patch introduces a new extension to allow different ways to
create an EGLDisplay to exist within the same libEGL.so.  The new
extension, EGL_MESA_get_display, introduces a new entrypoint:

  EGLDisplay eglGetDisplayMESA(EGLint type, void *display)

which takes an integer to identify the type of display to get and a
void pointer to provide extra parameters for the display type in
question.  At this point, three different display types are supported,
EGLNativeDisplayType, DRM display and XCB display.

Since an application needs to have an EGLDisplay before it can query
for extensions, the way to discover this extension is to just use
eglGetProcAddress().
---

Ok, thinking about this some more, the whole deal with passing in a
custom struct to eglGetDisplay() and relying on the layout of the X
Display struct was just a little too magic.  And since any application
using that needs to know about those structs and the display type
defines anyway, we may just as well make a new entrypoint.  This feels
a lot simpler and more robust, and we trade the eglplatform.h
additions that Chia-I didn't like for a new extension in eglext.h.

I haven't had time to follow the EGL work much lately.

Could you write an extensions spec for this? See docs/MESA_*.spec for examples.

In the spec, could you explain in more detail what problem this extension solves and maybe give an example of how it would be used?

Should the dri2_get_driver_for_fd() function and related code be put into a separate source file? It seems it might be useful in other contexts.

-Brian
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to