Kodi Community Forum
Linux Wayland/Weston in GLES - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
---- Thread: Linux Wayland/Weston in GLES (/showthread.php?tid=336735)



Wayland/Weston in GLES - CSylvain - 2018-10-21

Hello everyone,
I would like to use Kodi on a composer Wayland/Weston, I did my tests in Debian/X64 with these parameters :
Code:
-DCORE_PLATFORM_NAME=wayland -DWAYLAND_RENDER_SYSTEM=gl

The test being successful, I try to do it on a Mali/Amlogic GPU, so I can use it only in GLES :
Code:
-DCORE_PLATFORM_NAME=wayland -DWAYLAND_RENDER_SYSTEM=gles --enable-codec=amcodec

Without having the Intel / GLES in X64, I would like to know if it is normal that I have this compilation error, with the version 18.0b3-Leia, as well as the master ? :
Code:
../xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp: In member function 'bool KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext::InitWindowSystemEGL(EGLint, EGLint)':
../xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp:35:128: error: no matching function for call to 'CEGLContextUtils::CreatePlatformDisplay(wayland::display_t&, wayland::display_t&, EGLint&, EGLint&)'
   if (!m_eglContext.CreatePlatformDisplay(GetConnection()->GetDisplay(), GetConnection()->GetDisplay(), renderableType, apiType))
                                                                                                                                ^
In file included from ../xbmc/windowing/wayland/WinSystemWaylandEGLContext.h:11,
                 from ../xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp:9:
../xbmc/utils/EGLUtils.h:183:8: note: candidate: 'bool CEGLContextUtils::CreatePlatformDisplay(void*, EGLNativeDisplayType, EGLint, EGLint, EGLint)'
   bool CreatePlatformDisplay(void* nativeDisplay, EGLNativeDisplayType nativeDisplayLegacy, EGLint renderableType, EGLint renderingApi, EGLint visualId = 0);
        ^~~~~~~~~~~~~~~~~~~~~
../xbmc/utils/EGLUtils.h:183:8: note:   no known conversion for argument 2 from 'wayland::display_t' to 'EGLNativeDisplayType' {aka 'gbm_device*'}
../xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp: In member function 'virtual bool KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext::CreateNewWindow(const string&, bool, RESOLUTION_INFO&)':
../xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp:62:89: error: no matching function for call to 'CEGLContextUtils::CreatePlatformSurface(wl_egl_window*, wl_egl_window*)'
   if (!m_eglContext.CreatePlatformSurface(m_nativeWindow.c_ptr(), m_nativeWindow.c_ptr()))
                                                                                         ^
In file included from ../xbmc/windowing/wayland/WinSystemWaylandEGLContext.h:11,
                 from ../xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp:9:
../xbmc/utils/EGLUtils.h:186:8: note: candidate: 'bool CEGLContextUtils::CreatePlatformSurface(void*, EGLNativeWindowType)'
   bool CreatePlatformSurface(void* nativeWindow, EGLNativeWindowType nativeWindowLegacy);
        ^~~~~~~~~~~~~~~~~~~~~
../xbmc/utils/EGLUtils.h:186:8: note:   no known conversion for argument 2 from 'wl_egl_window*' to 'EGLNativeWindowType' {aka 'gbm_surface*'}

Is it recommended to use Kodi in GL for Wayland ?

I thank you in advance for your help.  Wink


RE: Wayland/Weston in GLES - fritsch - 2018-10-21

Not for amlogic - looks like broken MALI headers.


RE: Wayland/Weston in GLES - CSylvain - 2018-10-21

I use Rockchip r7p0, which contains more complete headers for Wayland, it runs well. Wink

I do not know if you received test returns in GLES ?
I'll see in the evening, if I have the same result in X64 Intel.


RE: Wayland/Weston in GLES - yol - 2018-10-21

Please try the official headers

https://www.khronos.org/registry/EGL/


RE: Wayland/Weston in GLES - fritsch - 2018-10-21

Why are you using amcodec on rockhip, btw.?


RE: Wayland/Weston in GLES - lrusak - 2018-10-21

Looks to me like you're using gbm only headers but you need thee wayland headers
Code:
../xbmc/utils/EGLUtils.h:183:8: note:   no known conversion for argument 2 from 'wayland::display_t' to 'EGLNativeDisplayType' {aka 'gbm_device*'}



RE: Wayland/Weston in GLES - CSylvain - 2018-10-21

(2018-10-21, 13:17)fritsch Wrote: Why are you using amcodec on rockhip, btw.?

interesting your answer, I use this Mali r7p0 driver on a WetekPlay 2 : https://github.com/rockchip-linux/libmali/blob/master/include/EGL/eglext.h#L806
I do not have a choice, Amlogic provides incomplete headers to compile Kodi with Wayland and gles support.
I confirm that I am now able to launch Weston in DRM, on my Wetek Play 2.


RE: Wayland/Weston in GLES - fritsch - 2018-10-21

There is nothing rockhip in your setup ... Processor (CPU): Quad-core (Amlogic S905H)


RE: Wayland/Weston in GLES - CSylvain - 2018-10-21

I'm not talking about the "CPU", but the GPU Mali (Utgard) 450MP.
I just keep the Linux driver that Amlogic provides, because it contains the parameters REG. Wink

My question is more about the compilation part, which fails in detail on my first post.
I test earlier the same method of compilation, on an "Intel X64", and I make you a return of the result.


RE: Wayland/Weston in GLES - yol - 2018-10-21

(2018-10-21, 22:07)CSylvain Wrote: My question is more about the compilation part, which fails in detail on my first post.

Please test the solution proposed to you already.


RE: Wayland/Weston in GLES - CSylvain - 2018-10-21

Back from my tests !
Intel side, everything is compiled, and runs correctly, so it proves that Kodi is strictly for nothing of these errors :
Image

Listed AMLogic, I followed the recommendations of "yol", and the compilation is done without error, a big thank you !
This confirms that the libraries "Mali" are not yet developed.
So I will recompile the sources that require EGL with these headers, then I will pass the tests, which will now be based on the execution under AMLogic, we will see the result, nothing is playing !


RE: Wayland/Weston in GLES - CSylvain - 2018-11-04

Everything is operational, the performances are excellent to finally move to the second stage !
Image

Thank you again for your quick feedback, it allowed me to save a lot of time, and fix some things on the libraries Mali r7p0.


This forum uses Lukasz Tkacz MyBB addons.