Check for EGL_KHR_platform_x11 in addition to EGL_EXT_platform_x11
ClosedPublic

Authored by garg on Oct 4 2016, 1:56 PM.

Details

Summary

Some platforms (like Mali) only report the newer EGL_KHR_platform_x11
on X11.

Diff Detail

Repository
R108 KWin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
garg updated this revision to Diff 7086.Oct 4 2016, 1:56 PM
garg retitled this revision from to Check for EGL_KHR_platform_x11 in addition to EGL_EXT_platform_x11.
garg updated this object.
garg added a reviewer: kwin.
garg added a subscriber: kwin.
Restricted Application added a project: KWin. · View Herald TranscriptOct 4 2016, 1:56 PM
graesslin requested changes to this revision.Oct 4 2016, 2:09 PM
graesslin added a reviewer: graesslin.
graesslin added a subscriber: graesslin.
graesslin added inline comments.
plugins/platforms/x11/common/eglonxbackend.cpp
183–184

are you sure that you want to check for or here? I thought you need an and

184–187

the debug message should be updated to say that neither EGL_EXT_platform_x11 nor EGL_KHR_platform_x11 is supported.

This revision now requires changes to proceed.Oct 4 2016, 2:09 PM
garg added inline comments.Oct 4 2016, 2:10 PM
plugins/platforms/x11/common/eglonxbackend.cpp
183–184

No, the Mali driver only reports EGL_KHR_platform_x11, not EGL_KHR_platform_x11 and EGL_EXT_platform_x11. Hence why imo the check should be a or.

184–187

Ack.

garg updated this revision to Diff 7088.Oct 4 2016, 2:16 PM
garg edited edge metadata.

Update as per comments

luebking added inline comments.
plugins/platforms/x11/common/eglonxbackend.cpp
183–184

The code now requires both, so if the mali driver only supports one, it will fail the check.
You might want to pull the negation outside the check?

garg updated this revision to Diff 7089.Oct 4 2016, 2:19 PM
garg marked 2 inline comments as done.
garg edited edge metadata.

Update

plugins/platforms/x11/common/eglonxbackend.cpp
183–184

Ah you are correct.

graesslin accepted this revision.Oct 4 2016, 2:46 PM
graesslin edited edge metadata.

Please push to Plasma/5.8 branch

This revision is now accepted and ready to land.Oct 4 2016, 2:46 PM
This revision was automatically updated to reflect the committed changes.