Hello, I'm a developer in fiends of graphic.
I found the bugs my application regarding mali.so. So, I want to get some advices.
My app accor an abnormal termination when doing glClearColor().
It happens not always, but quite often.
There is the callstacks. (refer to below)
[ARM Mali-G71 MP20 546 MHz GPU]backtrace:1. #00 pc 000000000054426c /system/vendor/lib/egl/libGLES_mali.so (_ZL24get_window_target_bufferP18egl_winsys_displayP18egl_winsys_surfacePP16egl_color_buffer+1200)2. #01 pc 00000000005771ac /system/vendor/lib/egl/libGLES_mali.so (eglp_window_next_render_target+64)3. #02 pc 0000000000577068 /system/vendor/lib/egl/libGLES_mali.so (eglp_first_operation_cb+56)4. #03 pc 000000000042f3a4 /system/vendor/lib/egl/libGLES_mali.so (gles_fb_first_operation_cb+32)5. #04 pc 0000000000426edc /system/vendor/lib/egl/libGLES_mali.so (glesx_fbp_prepare_to_render+48)6. #05 pc 000000000042de74 /system/vendor/lib/egl/libGLES_mali.so (gles_fbp_clear+52)7. #06 pc 000000000042c694 /system/vendor/lib/egl/libGLES_mali.so (gles_fb_clear+284)
[ARM Mali-G72 MP18 572 MHz GPU]
backtrace:1. #00 pc 0000000000457530 /vendor/lib/egl/libGLES_mali.so2. #01 pc 0000000000583ab4 /vendor/lib/egl/libGLES_mali.so3. #02 pc 0000000000583970 /vendor/lib/egl/libGLES_mali.so4. #03 pc 00000000004d4e60 /vendor/lib/egl/libGLES_mali.so5. #04 pc 00000000004cc8e8 /vendor/lib/egl/libGLES_mali.so6. #05 pc 00000000004d3928 /vendor/lib/egl/libGLES_mali.so7. #06 pc 00000000004d2134 /vendor/lib/egl/libGLES_mali.so
I wanna get the answer.
Thans for reading my post.
Best Regards.
Can you share a minimal reproducer for this one? It's not clear what has gone wrong without know what the application did to get in to this state.
Cheers, Pete
In that case, the timing of abnormal termination is before the rendering something.There is the source code. (refer to below)
//render n-1 frame //then, do swapbuffer
//prepare rendering n frame glEnable(GL_TEXTURE_2D); glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); glDisable(GL_BLEND); glEnable(GL_FOG);
glActiveTexture(GL_TEXTURE0);
glClearDepthf(1.0); glFrontFace(GL_CW); glCullFace(GL_BACK); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthFunc(GL_LEQUAL); glAlphaFunc( GL_GREATER, 0.0f ); glLineWidth(1.0f); glPointSize(1.0f); glClearColor(245.0f/255.0f, 243.0f/255.0f, 222.0f/255.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // here
Thanks.
Just to check - is this application using OpenGL ES 1.x? (I'd guess so by the enable calls for TEXTURE_2D and FOG).
Cheers,Pete
The application using OpenGL ES 2.0.
Thanks!
Hi Dear sgKim, I ever have a try to reproduce on other Mali devices. But I am sorry that I was unable to reproduce this issue.
From the backtrace, it seems that it might be glClear request buffer to the win system (probably call to dequeueBuffer of an ANativeWindow), it could be something wrong in the ANativeWindow. Would you mind share more detail information to us so that we could possible have a try?
1. Checking the driver version you usedadb shell dumpsys SurfaceFlinger | grep EGL => e.g: EGL implementation : 1.4 Bifrost-"r9p0-01rel0"2. Would you mind share your full source code (or apk) for us to try?
3. More possible, it would be great if you have a chance to run some android basic native test ? I am thinking your code have something similar to the following tests http://androidxref.com/8.0.0_r4/xref/frameworks/native/opengl/tests/thanks! :)