Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: ToastyAl on July 15, 2014, 07:16:00 AM
-
Hi all,
We're currently having issues with Adreno GPUs and our NGUI setup. We're working with Unity 4.5.1f and NGUI 3.5.8, currently we're forcing GLES 2.0 through the project settings.
We have a splash screen, right at the start of the game, which is displayed within a UIPanel. On first run the game will boot up and often go black when the splash screen should be displayed. After this nothing will render. Adding a delay before the splash seems to alter this timing a little. On failed runs it will output the following:
W/Adreno-EGL(22425): <qeglDrvAPI_eglGetConfigAttrib:542>: EGL_BAD_ATTRIBUTE
W/Adreno-EGL(22425): <qeglDrvAPI_eglGetConfigAttrib:542>: EGL_BAD_ATTRIBUTE
Followed by the GPU spamming out:
W/Adreno-EGLSUB(20362): <SwapBuffers:1382>: Invalid native buffer. Failed to queueBuffer
W/Adreno-EGLSUB(20362): <updater_thread:456>: native buffer is NULL
Subsequent runs seem to stand a better chance of getting through, although on the Nexus 7 (2013) we've had it repeatedly fail. Given it's working on future runs I'm assuming it's likely to be related to shader compilation?
I fixed the issue by switching to GLES 3.0, but then we get issues compiling NGUI shaders. Specifically "unlit/premultiplied colored 1" gives me the errors:
E/Unity(14343): -------- GLSL error: Vertex shader compilation failed.
E/Unity(14343): ERROR: 0:6: '' : GLSL error: #version must occur before any other statement in the program
E/Unity(14343): ERROR: 0:37: 'uniform' : cannot initialize this type of qualifier
E/Unity(14343): ERROR: 0:38: 'uniform' : cannot initialize this type of qualifier
E/Unity(14343): ERROR: 3 compilation errors. No code generated.
Has anyone had similar? The game is running fine on iOS so I'd really like to avoid any big changes to get things sorted.
Thanks!
-
you have an old version of ngui update to the lastest 3.6.8, maybe that can help
-
We had a HUGE project to update to 3.6. It was time consuming, but the worst part, was learning the ins and outs of updating. I know it seems like a monstrous task, but it is WELL WORTH THE UPGRADE! Do yourself and your team a favor, make a plan to update to 3.6, the benefits outweight the work you have done previously, if you upgrade correctly. Backup, Push and revert if problems arise, work out the kinks, then you will get through the upgrade.
Others commenting, might think an upgrade of that magnitude isn't worth it, but it's simpler than you might imagine or better yet, simpler than your first try!
-
Turn off multi-threaded rendering. It's an experimental (and broken) Unity feature. Also as others pointed out, upgrading to the latest version will help. Since you mentioned Adreno + 4.5 + older version, I'm guessing it might also be related to the bug in Unity that they claimed was fixed in 4.5 that turned out to not be fixed. I re-added the work-around used in Unity 4.3 to NGUI 3.6.8's update: http://www.tasharen.com/forum/index.php?topic=8415.0