AnsweredAssumed Answered

OpenCL and OpenGl simultaneous execution

Question asked by kcin on Feb 8, 2012
Latest reply on Feb 9, 2012 by Meteorhead

My program uses OpenGL to draw on the screen. This task is low-intensive but latency-sensitive. Another CPU thread of my program makes some calculations which are highly-intensive but of low priority. I implemented this calculations to be run on GPU using OpenCL. Since then I observe too big visual latency of the OpenGL drawing.

Is it possible to manage the GPU loading or to schedule tasks on GPU? I use AMD Radeon HD 5850. As far as I know, there is 'Device Fission' extension for OpenCL, which is helpful in such cases, but it is supported only for CPUs, isn't it?

Another thing I'm concerned with is that AMD System Monitor shows GPU occupancy at 55% level. So, in my opinion, there should be enough resources to run both parts, OpenGL and OpenCL, without stalling.

I made a small experiment with my OpenCL kernel function. A global work size was restricted with a small enough number to guarantee that some computing units will be idle when an OpenCL kernel is running. To compensate that, each work-item do more job. So GPU now is less occupied but kernel works longer. As a result, OpenGL becomes slower. Hence, it looks like OpenGL drawing and OpenCL calculations can't be done concurrently. Where can I find the information which cards supports such functionality?