Hi,
I'm trying to run a simple opencl kernel on the gpu. If I run it once, it seems to be running fine and I get the visual result
(some image convolution kernel) I expect to get.
However if I try to run the code in a loop, or to run on each frame received from the camera the phone just crashes.
It seems that the clEnqueueNDRangeKernel is causing this behaviour - if I comment it out and leave all the other OpenCL
commands (such as clEnqueueReadBuffer, clEnqueueWriteBuffer, clFinish...) it passes. The crash happens even if the kernel
is just a return statement and if the global size (the grid launch size) is one.
I'm getting the following error message in the LogCat:
Adreno200-GSL <gsl_ldd_control:226>: ioctl code 0xc0140910 (IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS) failed: errno 35 resource deadlock would occour
Adreno200-EGL <eglSwapBuffers:3498>: EGL_CONTEXT_LOST
HardwareRenderer EGL error: EGL_CONTEXT_LOST
Adreno200-ES20 <glFlush:56>: GL_OUT_OF_MEMORY
SurfaceTexture [com.example.opencltest/com.example.opencltest.MainActivity] updateTexImage: clearing GL error: 0x505
SurfaceFlinger eglSwapBuffers (0x1, 0x40ae4ec8) failed with 0x000030e
libc Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 216 (SurfaceFlinger)
And then there is, what looks like, some core dump in the LogCat.
I'm not creating any new resources in the code, I have 2 buffers of 0.5MB in size.
It seems that the clEnqueuNDRange causes some internal crash or serious resource leak.
Any assistance is very welcomed.
Eyal
Bump....