What does "Mesh buffer binding error: mCurrentBuffer = 2, binded buffer = 0" mean?
I get this error in my android app, followed by __egl_set_error:121: [WARNING]Mali EGL errorcode: 300d (which should stand for EGL_BAD_SURFACE)
Unfortunately, "Mesh buffer binding error" only yields 3
Also, this error might be connected to another strange behaviour that I get: Rendering only runs fine if I create my shaders and my meshes every single frame before rendering. Otherwise, the OpenGL context seems to "forget" about all but some of my shader uniforms and mixes them up, as if the program had been discarded.
I get this problem exclusively on Mali GPUs, namely 400 and 450. Please note that same code runs just fine without any errors on PowerVR SGX 535, Broadcom BCM2835 and Adreno 320.
Any ideas?
"Mesh buffer binding error: mCurrentBuffer = 2, binded buffer = 0"
That doesn't look like an error from the Mali drivers (I could be wrong) - is this an error from your application logic or engine?
Can you share a reproducer? It's very hard to help with so little solid information about what you are actually doing to go on.
Cheers, Pete
Thanks for your answer! And sorry for my late reply.
I installed the Mali Graphics Debugger on a rooted device (great tool!) and it seems the problem had to do with intermittent calls to eglMakeCurrent which broke my state. It seems that another OpenGL enabled thread issued these intermittent calls.
I was able to fix that by checking the current context and making my own context current if needed.
On the ASUS Nexus 7 (2013), I didn't ever even have this problem. Could it be that Adreno 320 is thread safe and Mali 400/450 isn't?
Could it be that Adreno 320 is thread safe and Mali 400/450 isn't?
A single thread can only have a single current EGL context, and a EGL context can only legally be current in a single thread - anything other than this is out of specification and YMMV across vendors - I wouldn't rely on any specific behaviour. I'm not aware of any current "known issues" impacting Mali-400 series in terms of thread safety provided you stick within the API limitations.
The fact you are having to make the expected current again implies that you are either not running on the thread you think you are, or that another thread has bound your context, so while rebinding may fix it, but it sounds like there are more serious underlying issues in terms of context management in your application. Without seeing a representative API sequence it's hard to provide specific advice.
Pete