[Mesa-dev] [RFC 0/7] eglplatform.h: removing local hacks and improving robustness
Emil Velikov
emil.l.velikov at gmail.com
Thu Sep 22 08:38:05 UTC 2016
Hi all,
This series aims to make platform detection/selection easier, explicit and less
fragile.
To do that I've introduced Vulkan inspired EGL_USE_PLATFORM_*_KHR macro
guards. The user _really_ wants to select the on they use, yet
things should continue to compile (albeit there can be ABI issues in
corner cases**) if they haven't provided any.
Why fragile - current approach depends on the include order, as such
platforms like GBM, Wayland and/or others need to have the respective
header included _before_ anything that would pull eglplatform.h - egl.h
eglext.h and/or others.
Furthermore alongside the GBM and Wayland platform others tend to be
done in a ad-hoc manner.
For example, the upstream Apple code is analogous to the Symbian, yet
for platforms such as Darwin one can/does use the XLIB code.
The series represents what IMHO is the "should happen in a perfect
world" solution, admittedly with the last 1-3 being rather debatable.
Any and all input would be greatly appreciated !
Thanks
Emil
** If we agree that we can remove the detection heuristics
Emil Velikov (7):
eglplatform.h: introduce and use EGL_USE_PLATFORM_*_KHR
eglplatform.h: introduce EGL_USE_PLATFORM_XCB_KHR
eglplatform.h: Introduce EGL_USE_PLATFORM_APPLE_KHR
eglplatform.h: warn when the user hasn't provided a known platform
eglplatform.h: remove local mesa hacks/workarounds from eglplatform.h
Revert "build: fix EGL build when no X11 headers are present"
eglplatform.h: remove buggy/fragile autodetection
configure.ac | 7 -----
include/EGL/eglplatform.h | 79 +++++++++++++++++++++++++----------------------
2 files changed, 42 insertions(+), 44 deletions(-)
--
2.9.3
More information about the mesa-dev
mailing list