Open craftyguy opened 7 years ago
Can you build tinygles with debug symbols and set up ltrace or something so we can see the function call that's failing?
For just this, you could also put a printf on the first line of glTexImage2D with all the arguments.
I think I specifically didn't bother giving TinyGLES full texture support because glshim already has it, so one more thing to try: https://github.com/lunixbochs/glshim supports a much wider range of OpenGL, including more texture options, and can use tinygles as a backend: if you run clutter in GLES mode but use glshim as the ES implementation, it will end up with more API support.
Also note if you use glshim you should cherry-pick this commit to better support tinygles' limited texture format options: https://github.com/lunixbochs/glshim/commit/062c9bf2469eaabd2fe78567d712dcf466ee3d7e
I will try to build tinygles with symbols and ltrace it.
if you run clutter in GLES mode but use glshim as the ES implementation, it will end up with more API support.
Ah, so this is where my knowledge of clutter, GL, GLES, etc breaks down. I'm not sure how to try what you are suggesting, so I tried some experiments:
1) I tried setting CLUTTER_DRIVER=gles2
, but that didn't have any effect. I'm not sure if clutter is actually paying attention to these env. variables like their docs say it should, since other options didn't do anything either.
2) I also tried removing libGLESv1_CM.so (from tinygles) from the equation, the output is below. hildon-desktop didn't start, but the texture error is gone:
(==) Log file: "/var/log/Xorg.7.log", Time: Thu Jan 1 18:07:23 1970
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
MESA-LOADER: failed to retrieve device information
gbm: failed to open any driver (search paths /usr/lib/xorg/modules/dri)
gbm: Last dlopen error: Error loading shared library /usr/lib/xorg/modules/dri/omapdrm_dri.so: No such file or directory
failed to load driver: omapdrm
Couldn't open libEGL.so.1: Error loading shared library libEGL.so.1: No such file or directory
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console
Naturally I would install mesa-egl, which provides libEGL.so.1, but in this case I'm not sure if there's a way to tell clutter "use GLES instead" (since the env. variable didn't work), or if it moves to EGL because I removed tinygles..
One problem with glshim/tinygles is they only provide a glx interface, not an egl interface. If there's an opengl 1.1 clutter driver, that might work with glshim -> tinygles, which does provide glx.
I see. I suspect a good portion of this is just be being confused about all these different permutations of the letters E, G, S, and L :)
I'll look into rebuilding clutter with opengl1.1 only
GL: oldest desktop graphics api ES: smaller mobile api GLX: api that gives you a new GL 1.x context EGL: api that gives you a new anything context (but glshim and tinygles don't expose)
tinygles exposes ES and GLX with an X11 and CPU backend (which is probably confusing to anything but glshim) glshim exposes GL and GLX with an EGL (or GLX) and ES backend
I'm trying to get cogl-hello (https://github.com/GNOME/cogl/blob/master/examples/cogl-hello.c) to run with tinygles. cogl had be to hacked for context creation, since it uses some not implemented GLX functions: https://hastebin.com/revadamala.diff
Now it crashes on glDrawArrays: https://hastebin.com/unajexisir.log. Is it ok that glshim's glArrayElement got called instead the one in TinyGLES?
@lunixbochs: Sorry for cluttering this issue, we can move it over to the postmarketOS tracker if you prefer.
@NotKit: cogl
seems to support various GL backends. I guess you could switch between them with some kind of environment variable, however I have not found out how to do this yet. We could also select the gles (v1?) backend at compile time (by disabling all others):
I guess if we do it that way, you should not need to patch the source.
A crash on glDrawArrays would be from a VBO if the crashing pointer is a low number.
On Sep 29, 2017, at 9:40 AM, Oliver Smith notifications@github.com wrote:
@lunixbochs: Sorry for cluttering this issue, we can move it over to the postmarketOS tracker if you prefer.
@NotKit: cogl seems to support various GL backends. I guess you could switch between them with some kind of environment variable, however I have not found out how to do this yet. We could also select the gles (v1?) backend at compile time (by disabling all others):
I guess if we do it that way, you should not need to patch the source.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Are VBOs supported by TinyGLES? They are part of GLES1, but I couldn't find any code for them in TinyGLES.
It should be glshim's job to polyfill them, but it doesn't do that yet. They wouldn't be too hard to implement.
I successfully built/packaged
tinygles
andglshim
, and have replaced the corresponding mesa bits with these libraries. When running hildon-desktop (which usese gtk2/clutter), I get the following error from X server: