Closed camel007 closed 2 years ago
Hi,
Be sure that:
But yes, it can be tricky to have a Mesa version correctly built to work with EGL based on the fbdev platform. It would be easier if the fbdev platform was still maintained in Mesa (its support has been removed since version 10.6.0): I'm putting this on my TODO list.
Thank you! Finally, I run yagears1(EGL with fbdev) on my device successfully. Share my configurations:
./configure
, should export CC, CXX. ./configure --prefix=PREFIX --host=aarch64-unknown-linux-gnu --enable-debug --enable-gles1 --enable-gles2 --enable-egl --disable-gbm --enable-shared-glapi --with-egl-platforms=fbdev --with-gallium-drivers=swrast -enable-shared --disable-openvg --enable-gallium-egl --disable-xorg --disable-glu --disable-glw --enable-opengl CFLAGS=-DMESA_EGL_NO_X11_HEADERS --disable-driglx-direct --with-driver=osmesa
modify yagears1
change the main.c as bellow
if (!strcmp(backend, "egl-fbdev")) {
egl_win = eglCreateWindowSurface(egl_dpy, egl_config, (EGLNativeWindowType)fb_win, NULL);
}
to.
if (!strcmp(backend, "egl-fbdev")) {
egl_win = eglCreateWindowSurface(egl_dpy, egl_config, (EGLNativeWindowType)0, NULL);
}
if window is not zero, create window surface wiil fail. mesa has judegement logic in native_fbdev.c
/* there is only one native window: NULL */
if (win)
return NULL;
configuration for yagears1:
./configure --host=aarch64-linux-gnu --disable-gl --disable-gl-x11 --disable-gl-directfb --disable-gl-fbdev --disable-egl-x11 --disable-egl-directfb --disable-egl-wayland --disable-egl-drm --disable-egl-rpi --disable-egl-xcb --disable-qt --disable-gtk --disable-sfml --disable-png --with-sysroot=/xxxx/staging
Great!
I now remember using EGL with the Linux Framebuffer on an embedded system but having a Mali GPU. The proprietary OpenGL implementation allowed to specify an EGLNativeWindowType when calling eglCreateWindowSurface() and I slightly modified the Mesa implementation in order to have the same possibility in Mesa.
But I should work on that again: I'd like to see fbdev platform support in Mesa again.
As you tell in your ppt:
my device has arm a53 without gpu. I build mesa-7.11.2 and yagear
when i run
./test/yagears2 -b egl-fbdev -e glesv1_cm
, it gives me: