AnsweredAssumed Answered

OpenCL does not work after gtk_init()

Question asked by xiuan on Aug 30, 2014

I have a strange problem that I cannot solve myself. I am using GTK+ (version 3.12) in combination with OpenCL (version 1.2).

When calling clBuildProgram() before gtk_init(), everything works fine and OpenCL behaves as expected. But when calling clBuildProgram() after gtk_init(), something goes wrong and OpenCL hangs after committing a kernel via clEnqueueNDRangeKernel() and waiting for the results using clFinish().


Can someone tell me how to fix that?

 

I am new to GTK+, but could it be that GTK+ (or its base project GLib and cairo) uses OpenGL? Maybe then the OpenCL context must be created from an OpenGL context, right?!

 

My system runs on Linux with AMD's APP-SDK (2.9) and its display driver fglrx-14.7-b.

Outcomes