开发者

Can one use OpenGL in the Kernel?

Can I use OpenGL in the Linux Kernel? That is, I'd like to improve the performance of some code, so using the GPU would be benefit for another driver. It's certain the GPU would be fixed on the machine for which开发者_C百科 this kernel would be build.

Sorry if I sound naive, I am just trying to get the general picture for the moment.

Thanks!


OpenGL is for displaying 3D on screen, I really don't know in which way you want to use it in the kernel.

If you meant using the computational power of the GPU for some calculations, I think it would be feasible in some parts of the kernel, but I doubt it is worth the pain.


No, you can't, the biggest reason is that you can't use floating point math in the kernel. Besides that accessing such driver from within the kernel is a very bad idea. I don't know if the kernel is even able to link to a usermode library (libGL.so or libOpenCL.so).


  • GPUs simply don't work the way you imagine.
  • What do you want to accelerate? Just some standard computation? Kernel code does not run faster than user space code! Actually some things are even slower.
  • You know, that even using the floating point unit (FPU) in the kernel is highly nontrivial and discouraged.
  • GPU computing is not a magic bullet.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜