androidopengl-esopengl-es-2.0powervr-sgx

PowerVR - GL_OUT_OF_MEMORY on glDrawElements


I've encountered GL_OUT_OF_MEMORY error after call glDrawElements on PowerVR GPUs. This happens on the following devices:

According to glDrawElements specs it can't result in GL_OUT_OF_MEMORY error at all but I definitely get this error on PowerVR hardware.


Solution

  • This was caused by some bug in ETC1 texture implementation. If I use a ETC1 texture with dimensions of 1x1 pixels it causes this bug on PowerVR GPU. I've fixed it by using 4x4 texture (a size of ETC1 smallest block).

    This issue is not reproduced if ETC1 textures are used with mipmaps - in this case it works w/ all mipmaps.