Hello.
I am developing a games for android. There is a device Samsung Galaxy S3 with gpu Mali-400MP, android version 4.3. I have a problem when rendering buffer in parts. I wrote a test application to demonstrate the problem.
First I created a vertex buffer and fill them with random values. Then created an index buffer with random values, but within the number of vertices.
If draw the entire buffer, then all is well.
GLES20.glDrawElements(GLES20.GL_TRIANGLES, ICOUNT, GLES20.GL_UNSIGNED_SHORT, 0);
But if I try to draw one triangle, application fail at random iteration.
private int i_offset = 0;
...
GLES20.glDrawElements(GLES20.GL_TRIANGLES, 3, GLES20.GL_UNSIGNED_SHORT, i_offset*2);
i_offset += 3;
if((i_offset + 3) > ICOUNT) i_offset = 0;
What could be the problem? On the other gpu all drawn normally.
Hi alex.
Have got it triggering every time now with indices 8191, 6948, 8190. It doesn't matter what the vert data is, but seems to trigger based on some interaction between delta and offset of indices. We're still looking into it, but until we know exactly what's causing it, I'd recommend reordering your verts so the delta between them is as small as possible (think Forsyth triangle reordering, but also reordering the verts themselves to line up linearly in order of access. This is a good optimization anyway). The driver version can be found in the /system/lib/libMali.so file by grepping for REVISION, but isn't queryable in GLES to my knowledge.
UPDATE: Does not reproduce on trunk, so is fixed. Checking r4p0 (latest release) also.
UPDATE: Doesn't reproduce on r4p0 either, so has been fixed there also.
Hope this helps,
Chris