Just got a reply from Robert Broglia, I'm gonna post it here so everybody can see:
Ok, no problem. I'll look up some threads about my emulators and build up the post count.
About the white screen issue, here what's going on: Due to how the timer works when auto-frameskip is active in my apps, the first frame might draw a texture that hasn't been written to yet (I'm fixing this in the next update so it can't happen). The normal texture backend code creates the texture using glTexImage2D and normally this isn't a problem as you'll just get junk or a blank image for the very first frame. When on Android 4.0+ I use a SurfaceTexture and perform the equivalent operations, but it appears the Adreno driver on CM9 delays the internal allocation of the texture until it's first written to and this in turn creates an interaction with the GL_TEXTURE_EXTERNAL_OES state if it's been previously enabled. If the GL_TEXTURE_EXTERNAL_OES isn't explicitly disabled/enabled after this happens, the texture contents aren't rendered even though the SurfaceTexture is updating. Here's a possible sequence to trigger the bug:
1. new texture id created from glGenTextures and bound by glBindTexture to the GL_TEXTURE_EXTERNAL_OES target
2. new SurfaceTexture object constructed in Java with the texture id
3. ANativeWindow object acquired by native code and configured with ANativeWindow_setBuffersGeometry
4. glEnable(GL_TEXTURE_EXTERNAL_OES) called
5. geometry utilizing the SurfaceTexture is drawn to the screen and the display buffers are swapped (end of frame 1, texture appears blank/undefined as expected)
6. ANativeWindow object locked/unlocked/posted with content and updateTexImage() called on the SurfaceTexture
7. geometry utilizing the SurfaceTexture is drawn to the screen and the display buffers are swapped (end of frame 2, texture appears with correct content on Tegra 2, Mali, and Android SDK emulator OpenGL drivers, but blank/undefined on Adreno CM9)
8. Repeat step 7, behavior remains the same, but if glDisable(GL_TEXTURE_EXTERNAL_OES) and glEnable(GL_TEXTURE_EXTERNAL_OES) are called then the Adreno shows the correct content
If you move step 6 in between 3 & 4 then you get the correct content displaying on the Adreno driver. Since the enable/disable behavior of GL_TEXTURE_EXTERNAL_OES should mirror GL_TEXTURE_2D (it never needs to be explcitly disabled/enabled to recognize changes in the bound texture), I believe this is a bug. Do you know who I can get in touch with to get this looked at?
He's working his way up the posting ladder, so hopefully soon we'll be able to see him here
Yeah, he got back to me as well. I confirmed, if I shut off auto frame skip, I can't reproduce the issue. Not really shocked that it's a driver issue either, there seems to be a few versions of the adreno libs out there now, according to the thread about them in the touchpad forum on RootzWiki. Seems like Qualcomm is still working the kinks out.
Just four days ago, the T-Mobile Galaxy Note 3 received an OTA update to Android 4.4.2. … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?