check for EGL_KHR_platform_gbm extension as well
ClosedPublic

Authored by mart on Feb 6 2018, 5:35 PM.

Details

Summary

some drivers, like Mali have EGL_KHR_platform_gbm
but not EGL_MESA_platform_gbm

Test Plan

pending a test on rock64 board

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Feb 6 2018, 5:35 PM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 6 2018, 5:35 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
mart requested review of this revision.Feb 6 2018, 5:35 PM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 6 2018, 5:35 PM
davidedmundson requested changes to this revision.Feb 6 2018, 5:42 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
plugins/platforms/drm/egl_gbm_backend.cpp
110

this is going to crash and burn when you have KHR but not Mesa.

You'll need to keep track of which extension you have, and alter any extension specific code accordingly.

This revision now requires changes to proceed.Feb 6 2018, 5:42 PM
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptFeb 6 2018, 5:42 PM
mart updated this revision to Diff 26664.Feb 6 2018, 6:02 PM
  • wock which extension we're usingrks both as qwidget and with the qstyle-based qqc2-desktop-style
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 6 2018, 6:02 PM
garg added a subscriber: garg.Feb 8 2018, 5:27 PM

BTW this patch works as tested on both the Rock64 and Pinebook, but kwin fails in another place now. Will continue investigating.

Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptFeb 8 2018, 5:27 PM
graesslin requested changes to this revision.Feb 8 2018, 6:17 PM
graesslin added a subscriber: graesslin.
graesslin added inline comments.
plugins/platforms/drm/egl_gbm_backend.cpp
110

which could be as easy as setting a local variable GLenum platform = hasMesaGBM ? EGL_PLATFORM_GBM_MESA : EGL_PLATFORM_GBM_KHR

and use this in the eglGetPlatformDisplayEXT call without all the if-else.

This revision now requires changes to proceed.Feb 8 2018, 6:17 PM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 8 2018, 6:17 PM
mart updated this revision to Diff 27228.Feb 15 2018, 10:48 AM
  • have the gl platform in a variable
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptFeb 15 2018, 10:48 AM
mart marked an inline comment as done.Feb 15 2018, 10:48 AM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 15 2018, 10:48 AM
graesslin accepted this revision.Feb 15 2018, 4:48 PM
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptFeb 15 2018, 4:48 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 15 2018, 6:33 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 15 2018, 6:33 PM