We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3856 - Fix detection of EGL support when using DRM
Summary: Fix detection of EGL support when using DRM
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.6
Hardware: ARM Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-02 10:39 UTC by Olivier
Modified: 2017-10-02 12:45 UTC (History)
1 user (show)

See Also:


Attachments
Patch to modify configure.in (3.48 KB, patch)
2017-10-02 10:39 UTC, Olivier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier 2017-10-02 10:39:52 UTC
Created attachment 2963 [details]
Patch to modify configure.in

In the compile test to check for EGL, gbm.h must be included to
satisfy the EGL/eglplatform.h check #elif defined(__GBM__) when libdrm and gbm is used with MESA OpenGLES.

This will then define SDL_VIDEO_OPENGL_EGL which is checked in the drmkms driver.  It will also correctly typedef EGLNativeDisplayType,
EGLNativePixmapType and EGLNativeWindowType.

Tested with testgles and testgles2 on RaspberryPi3 with
libdrm, VC4 gallium driver and Mesa 17.2.1

The same change should be made for CMakeLists.txt and sdlchecks.make.

The attached patch only serves to illustrate the problem with a crude fix.  The bottom line is that in the compile tests for EGL, gbm.h needs to be included when using DRMKMS, else OpenGles will not work.