glshim


Just remember I changed the way PUSH_IF_COMPILING works due to remote stuff, so you should delete the FORWARD_IF_REMOTE macro and use the old PUSH_IF_COMPILING. I also don't use LOAD_GLES_OES, instead using PROXY_OES
 
Oh, you shouldn't need the -DBCMHOST=1 define anywhere if you integrate my rpi support properly. You should also look at my glx initialization, which automatically tries LIBGL_FB if normal window fails.
 
Last edited by a moderator:
Code:
[  3%] Building C object src/CMakeFiles/GL.dir/glx/glx.c.o
/home/pi/glshim/src/glx/glx.c:196:7: error: conflicting types for ‘open_lib’
 void *open_lib(const char **names) {
       ^
In file included from /home/pi/glshim/src/glx/../gl/gl.h:87:0,
                 from /home/pi/glshim/src/glx/glx.h:11,
                 from /home/pi/glshim/src/glx/glx.c:15:
/home/pi/glshim/src/glx/../gl/loader.h:14:14: note: previous declaration of ‘open_lib’ was here
 extern void *open_lib(const char **names, const char *override);
              ^
/home/pi/glshim/src/glx/glx.c: In function ‘glXMakeCurrent’:
/home/pi/glshim/src/glx/glx.c:749:102: warning: passing argument 3 of ‘egl_eglCreateWindowSurface’ makes pointer from integer without a cast
    eglSurface = context->eglSurface = egl_eglCreateWindowSurface(eglDisplay, context->eglConfigs[0], drawable, NULL);
                                                                                                      ^
/home/pi/glshim/src/glx/glx.c:749:102: note: expected ‘EGLNativeWindowType’ but argument is of type ‘GLXDrawable’
/home/pi/glshim/src/glx/glx.c:753:80: warning: passing argument 3 of ‘egl_eglCreateWindowSurface’ makes pointer from integer without a cast
             eglSurface = egl_eglCreateWindowSurface(eglDisplay, eglConfigs[0], drawable, NULL); // create surface only if needed
                                                                                ^
/home/pi/glshim/src/glx/glx.c:753:80: note: expected ‘EGLNativeWindowType’ but argument is of type ‘GLXDrawable’
In file included from /opt/vc/include/interface/vcos/vcos.h:185:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from /home/pi/glshim/src/glx/glx.h:1,
                 from /home/pi/glshim/src/glx/glx.c:15:
/home/pi/glshim/src/glx/glx.c: At top level:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined
 void vcos_timer_delete(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined
 void vcos_timer_reset(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined
 void vcos_timer_cancel(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined
 void vcos_timer_set(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined
 VCOS_STATUS_T vcos_timer_create(VCOS_TIMER_T *timer,
               ^
In file included from /opt/vc/include/interface/vcos/vcos.h:127:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from /home/pi/glshim/src/glx/glx.h:1,
                 from /home/pi/glshim/src/glx/glx.c:15:
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined
 void vcos_thread_resume(VCOS_THREAD_T *thread);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined
 int vcos_thread_running(VCOS_THREAD_T *thread);
     ^
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined
 VCOS_UNSIGNED vcos_change_preemption(VCOS_UNSIGNED pe);
               ^
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined
 void vcos_thread_relinquish(void);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined
 VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread);
               ^
In file included from /opt/vc/include/interface/vcos/vcos.h:185:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from /home/pi/glshim/src/glx/glx.h:1,
                 from /home/pi/glshim/src/glx/glx.c:15:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined
 void vcos_timer_delete(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined
 void vcos_timer_reset(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined
 void vcos_timer_cancel(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined
 void vcos_timer_set(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined
 VCOS_STATUS_T vcos_timer_create(VCOS_TIMER_T *timer,
               ^
In file included from /opt/vc/include/interface/vcos/vcos.h:127:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from /home/pi/glshim/src/glx/glx.h:1,
                 from /home/pi/glshim/src/glx/glx.c:15:
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined
 void vcos_thread_resume(VCOS_THREAD_T *thread);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined
 int vcos_thread_running(VCOS_THREAD_T *thread);
     ^
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined
 VCOS_UNSIGNED vcos_change_preemption(VCOS_UNSIGNED pe);
               ^
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined
 void vcos_thread_relinquish(void);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined
 VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread);
               ^
src/CMakeFiles/GL.dir/build.make:606: recipe for target 'src/CMakeFiles/GL.dir/glx/glx.c.o' failed
make[3]: *** [src/CMakeFiles/GL.dir/glx/glx.c.o] Error 1
CMakeFiles/Makefile2:79: recipe for target 'src/CMakeFiles/GL.dir/all' failed
make[2]: *** [src/CMakeFiles/GL.dir/all] Error 2
CMakeFiles/Makefile2:91: recipe for target 'src/CMakeFiles/GL.dir/rule' failed
make[1]: *** [src/CMakeFiles/GL.dir/rule] Error 2
Makefile:110: recipe for target 'GL' failed
make: *** [GL] Error 2
pi@raspberrypi ~/glshim $
 
Hi,


so is starting and running and also i can see the text perfect..


But it looks like there is not hardware accelerated. But also with only software rendering i had 15fps.


I see 0,2fps and the image is not move.


With the unstable branch from lunixbochs i have about 40fps.


The image is only 382x288px


Some linking not correct? Wrong lib?


It takes also a long time to start.. about 10sec. then ist makes an Fullscreen and after that it comes the little preshow picture.


Then it writes at start round about 30fps and decrease to 0,2fps


Keyboard response is also slow... sometimes not response...
 
Last edited by a moderator:
Something is wrong indeed.


Try to use with LIBGL_FB=1 or without it


You can try also with LIBGL_BATCH=2


Also, if you can run a "sudo perf top" in another terminal to see what's going on.
 
Last edited by a moderator:
Hi,


without LIBGL_FB=1 i became an EGL Error Bad Display 0x3008.


Also if i use LIBGL_BATCH=2


The lunixbochs branch start with and without the LIBGL_FB=1.


So Raspberry PI Debian don't have perf... i find no package for that?


Linux-Tools is not enough to start perf.. so i fin dan RPI Monitor.


I will test...
 
Ah no.. the RPI Monitor is only for Hardware surveillence.


Can't find the linux-tools-4.1.13-v7+ for the  RPI....


Other ideas?
 
Hi


"Can you try with both "LIBGL_FB=1 LIBGL_BATCH=2" ? "


the same Problem. 0,2fps.. it looks like it stops and no moving from the kamera appear on the image.
 
Something goes wrong with some rendering, but I have no idea what. It cannot be debugged remotly at this stage... Some "printf" has to put (either in the software or glshim) to understand where the software is stuck...
 
ptitseb: do you do the same batched rendering for bitmaps as me? that (or streaming textures, or an automatic atlas texture) is the only way you'll get any performance out of a font renderer that calls glBitmap for individual glyphs.
 
Last edited by a moderator:
ptitseb: do you do the same batched rendering for bitmaps as me? that (or streaming textures, or an automatic atlas texture) is the only way you'll get any performance out of a font renderer that calls glBitmap for individual glyphs.

No, I don't batch, I had issue with batching glBitmap with Blender so I stopped. But yes, that could be the issue here if there is a lot of glBitmap calls. But to get 0.2fps (instead of 40fps) it should have hundreds of such calls.
 
Back
Top