glTexDirectVIVMap function, which instructs the GPU to read the pixels via DMA from the given memory region, can greatly reduces CPU load. I have successfully implemented this function in an i.mx 6D/Q project(Android 4.4, Linux version: 3.10.53), and achieved great performance. After that, I migrated my project to another platform(i.mx 6D, Android 7.1.1, Linux version: 4.1.15). But there is a "java.lang.RuntimeException: createContext failed: EGL_BAD_CONFIG" exception implementing my project in that platform.
Furthermore, I'v tried to link two different .so files: libGLESv2.so and libGLESv2_VIVANTE.so.
(1) Compile and link my project with libGLESv2.so, using glTexIamge2D to dynamiclly update the camera texture, and then download the program into the Android 7.1.1 platform:
Result: The program runs OK with low perfermance.
(2) Simularly, compile and link with libGLESv2_VIVANTE.so, using glTexDirectVIVMap to update the camera texture, and then download the program.
Result: It shows "java.lang.RuntimeException: createContext failed: EGL_BAD_CONFIG" exception during the initialization.
Actually, all the GL functions have a visiting problem when I use libGLESv2_VIVANTE.so: not only glTexDirectVIVMap, but alse glClear, glCreateShader, etc.
Can anyone tell me why?
By the way, I have another question:
Can glTexDirectVIVMap be used in i.mx 8 platform? Is there any examples?
Hi Bio_TICFSL,
Thank you for your reply, but I haven't solved this problem yet.
Recently, I'v tried extracting the funtion pointers of glTexDirectVIVMap and glTexDirectInvalidateVIV from glGLESv2_VIVANTE.so, and use them to update textures efficiently in a demo project. It runs OK on the Android 4.4 platform, just like directly calling those two functions. Other GL functions, like glCreateShader, glClear, etc., are compiled and linked with glGLESv2.so.
As I migrate the demo project to the Android 7.1.1 platform, the OpenGL context creates OK, the shaders compile and link OK, but when it goes to the calling of glTexDirectVIVMap(with function pointers), it comes with "Failed to open device: No such file or directory, Try again..." error. I don't know which device it needs to open and it seams that the function glTexDirectVIVMap could not be called by application program in my Android 7.1.1 platform, either directly or indirectly.
Can function glTexDirectVIVMap be used in Android 7.1.1 or higher(Android O)? Or, is there any problems with configuration?
Hi sr
This is a known issue for the release you are working on The issue is that some devices do not correctly report their OpenGL configurations to allow us to create our OpenGL context. We need to be specific in creating the OpenGL context. It will still be problematic on some, especially migration codes running older versions of Android.
You can download the BSP of the i.MX8 from:
Regards