Dear ARM Mali Graphics community,
I am trying to debug an application which is not rendering on my Mali 400 MP device.
The application is an example bundled with the android version of the VTK library, available on github. As discussed on the VTK mailing list, the issue seems to be related with the specific Mali 400 GPU. The same code is reported to run on a Mali 628 MP6 GPU.
I tried to analyze the mgd trace but, as discussed in my previous post, I find it hard to analyze it because of a lot of errors related to GLES30 calls by MGD that clutter the output of the debugger, so that it is difficult for me to say which errors are real and which aren't.
I realize that, it would be easier for you if I could provide you a self contained code (and not one based on a large library!). Unfortunately I cannot, so let me start asking you some preliminary questions:
1. looking at the mgd trace provided above, are you able to spot what the culprit may be?
2. in general, what could be the issues that prevent rendering on Mali 4XX of a code reported to be working fine on Mali 6XX?
Thank you,
Frank
Looking at the trace, each of your draw calls is failing with a GL_INVALID_ENUM error. You can see this by expanding the Trace Outline View nodes to show draw calls, each one has "Error: GL_INVALID_ENUM" next to it.
Looking at the calls themselves (for example function no. 3942), they are using 'type=GL_UNSIGNED_INT'. This is valid in OpenGL ES 3.0 which is why it works on a Mali-T628 (which supports OpenGL ES 3.0), however OpenGL ES 2.0 only supports GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT (see OpenGL ES 2.0 docs and OpenGL ES 3.0 docs). Mali-400 devices only support OpenGL ES 2.0 and so those calls won't work.
You will have to adjust the data in 'indices' to make sure it is either bytes or shorts and then use GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT as the type.
Thanks,
Jon.
Thank you very much for both your replies.
I have changed GL_UNSIGNED_INT to GL_UNSIGNED_SHORT and I confirm that at least now the application is rendering, although the results are not yet as expected (I am trying to render a sphere, but I am able to see only less then a quarter of it). In any case, I will report this to the VTK mailing list, where I may get further insights regarding their implementation.
Thanks also for the comment on eglMakeCurrent. I thought that it was related to the change of camera. Also in this case I will ask for further clarification to the external library developers.