I'm having issues analyzing shader cycle count of an OpenGLES 2.0 application using the linux version of Mali Graphics Debugger 5.1.0.8a0102de (the target is running a Mali400-MP2 GPU on linux). Cycle analysis is working fine under the same MGD version on windows however!
The symptoms are as follows:
For most shaders, but not all, the fields for cycles / A / L/S and T fields are all set to "N/A", and hovering above these fields prints a tooltip with the message "Unable to run the mali offline compiler". On the console, I'm seeing a few warnings of the form:
[WARNING]: Error compiling shader in GlShaderCompiler: For input string: "2,6"
Is there a way to better understand what's tripping up the shader compiler?
The standalone offline compiler doesn't have any issues compiling the respective shaders and reporting the cycle counts, and the windows version of MGD works as well, so this seems to be a fairly low-level string processing/locale issue. Maybe just a newline issue or somesuch? Any hints appreciated!
Hi reciprocal,
If it's possible to share a small reproducer .mgd file, or even the shader which is causing the problem, I'll ask the engineering team to take a look at it.
If I had to guess I'd agree it sounds like a locale problem (2.6 vs 2,6) - what locale are you based in?
Cheers, Pete
Indeed, the problem is locale related. My locale is de_DE.UTF-8, so the decimal separator is "," by default. Running MGD
LANG=C ./mgd
works correctly. Unfortunately, I can't share the shader code. The error source is not totally obvious, as I didn't find the numeric constant reported in the warning ("2.6" or "2,6") in the source code . Anyway, for a fix it would appear necessary to insulate shader string processing from the locale.
Hi Peter, and thanks for the quick reply btw :-)
Thanks for testing it out - I'll raise that one with the team to get fixed in the next release.