OK, let's see. Not very simple questions for a first post
OpenCL can't be completely independent of graphics unless you plan to run with a separate GPU dedicated to compute work. This might actually be an easier way to get OpenCL going quickly but you lose some things in the process (see below).
If OpenCL is running on the same GPU as graphics, then you need a way to ensure that the two drivers (compute and graphics) don't both access the chip at the same time and lock it up or mess up what the other driver is doing. That means the OpenCL driver will need to use the drm (kernel module) at minimum.
The next point is that one of the cool things about OpenCL from a programmer perspective is that it can interoperate with OpenGL, ie you can share data between compute and graphics to allow efficient visualization of the compute results. This is great for the app developers but a big pain for the driver developers, who actually have to *implement* OpenCL in such a way that it can share with OpenGL. For the open source world, this means tying into Mesa, I expect.So... at first glance OpenCL can be independent from graphics, but the closer you get the less independence there seems to be.
Bottom line is that practically speaking an OpenCL implementation is likely to either be an extension to an existing OpenGL implementation or (more likely) a separate code base sharing some code and structures with the OpenGL tree). I know we have been working on adding OpenCL to the Catalyst driver stack for quite a while (since that gives us a solution for a wide range of OSes), but I am not aware of anyone working on an open source OpenCL implementation yet.
For things like video processing (ffmpeg) I think coding over Gallium3D would probably make more sense than coding over OpenCL for the long term; it'll be interesting to see which shows up first; proprietary OpenCL drivers or Gallium3D getting merged into the mainstream open source driver stack. I have been meaning to check whether the current Gallium3D API includes support for resolving conflicts between multiple clients trying to draw through it at the same time (eg. video and gl at the same time), maybe I'll remember today
Blender, on the other hand, may make more sense to run over OpenCL than Gallium, but I don't know enough about the internals to really say. Having the code be open-source is nice, but it still doesn't help with finding time to actually *look* at it all![]()


Reply With Quote

