- Home /
Android PicoVR EGL_BAD_SURFACE Error?
Hi everyone,
I am currently working on a VR experience for the Pico Neo 2 headset using Unity that requires asynchronous GPU readback to convert a render texture to JPG byte data on Android and integrated NatRender (https://githubmemory.com/repo/natsuite/NatRender) in my Unity project to do so. Unfortunately, I have been getting some weird EGL errors that I have not been able to get to the bottom of, and am hoping you may be able to help. Here is all the information you may need:
In our project (Unity 2019.3.6f1), we are seeing the image rendered through NatRenderer freeze at points and log eglMakeCurrent:999 error 300d (EGL_BAD_SURFACE) by Unity. As Khronos official documentation described, "If either draw or read are not valid EGL surfaces and are not EGL_NO_SURFACE, an EGL_BAD_SURFACE error is generated.", so it should be something that causes the EGLSurfaces to not be valid and thus block the Unity rendering process. As I don't have the access to Unity and libEGL source code, so cannot dig deeper to find the root cause.
The images we are rendering is a camera stream coming from the VR headset's built-in cameras which are obtained using the function 'BoundarySystem.UPvr_BoundaryGetSeeThroughData' which is from Pico's API (http://sdk.picovr.com/docs/sdk/en/index.html). This function works fine when not using NatRenderer but once we integrate it, the rendering freezes. And vice versa, where NatRenderer works fine on the headset without calling that function but once we put both together, we see the freezing behavior. Note, we are also calling Graphics.Blit outside of the readback but I have tested disabling it and am still seeing the issue.
Below is the code we are running as well as the log output. Any help leading to this issue fixed will be greatly appreciated; we are extremely close to having a viable product and this is the last issue we are running into so time is of the essence. Thank you!
https://drive.google.com/drive/folders/1EyD-3ycKNWSl_soVbcl6ntQ-wASLqZ_h?usp=sharing
Your answer
Follow this Question
Related Questions
Why does the internal profiler show no GPU usage? 1 Answer
GearVR rotation stutter InputTracking.GetNodeStates 1 Answer
Why is a Unity Cardboard/Daydream hybrid app not compatible with a Moto G4? 0 Answers
App has closed unexpectly in GEAR VR after allowing all permissions 0 Answers
Gear VR taps and swipes 0 Answers