[Mesa-dev] [PATCH] Introduce platform displays internally

Chia-I Wu olvaffe at gmail.com
Fri Jun 18 09:30:50 PDT 2010


Hi Krisitian,

While working on the multiple EGL libraries idea, it turns out there is one
internal change that is beneficial for all approaches on the table.  You can
find the change as a patch in the attachment.

The patch is basically a rewrite of the internal change you did for
EGL_MESA_typed_display.  It introduces a new notion: platform displays.  A
platform display is exactly a typed display in EGL_MESA_typed_display, except
that it is entirely internal.  In the patch, a driver is updated to always deal
with a platform display.  A native display, whose type is EGLNativeDisplayType,
is now treated as a platform display whose platform is determined at compile
time.  When eglCreateWindowSurface is called with a non-native platform
display, EGL_NO_SURFACE is returned and EGL_BAD_NATIVE_WINDOW is set.

The patch does not add any new public functions or tokens to specify a
non-native platform display.  However, it makes EGL ready to support
EGL_MESA_typed_display or the more specific eglGetDRMDisplay.  It also allows
me to support multiple EGL libraries without going into Makefile hell.  As a
result, I've created two branches

  http://cgit.freedesktop.org/~olv/mesa/log/?h=egl-drm-display
  (for eglGetDRMDisplay)

  http://cgit.freedesktop.org/~olv/mesa/log/?h=multi-egl
  (for multiple EGL libraries)

The interesting commit in multi-egl branch is the last one

  "egl: Build one library for each platform."

It installs multiple libEGL.so's and .pc files.  The .pc files for non-X11
platform defines macros so that apps pick the correct platform (correct native
types, no Xlib headers) from eglplatform.h.

Both approaches look fine to me.  I seriously do not have a preference here.
But I would like to know if it is fine to land the patch first, or to rebase
your work on it.  The patch allows me to do some cleanups to st/egl.  What do
you think?

-- 
olv at LunarG.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-egl-Introduce-platform-displays-internally.patch
Type: text/x-diff
Size: 20613 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100619/3c149966/attachment-0001.patch>


More information about the mesa-dev mailing list