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?
|awesomeness, bazinga, cdma, cyanogenmod, first xperia play cm9 with theme manager!!, ics, legend-wait-for-it-dary!, penut butter jelly time!, r800x, sudo install!, unofficial cm9, why haven't you installed this yet?, xperia play, zeusc|
|Thread Tools||Search this Thread|