[Mesa-dev] GSoC : OpenCL over Gallium3D
Radu Benea
kitanatahu at gmail.com
Sat Mar 26 14:32:32 PDT 2011
Hello,
To be perfectly honest I'm not sure I know much about how OpenCL is supposed
to work, but I know that shaders are supposed to be doing math on vectors and
multidimensional matrices, so my guess would be you'd have to find a way to
translate OpenCL code into shader code, than compile and use it. In other
words I think your idea about using a render buffer and shaders is the right
path to go.
At any rate I hope you get some expert opinions about this. Good luck!
On Saturday, March 26, 2011 22:52:22 Denis Steckelmacher wrote:
> Hello,
>
> After some messages on this list, I reconsidered my GSoC proposal and
> decided to give a try at an OpenCL state tracker. I will base my work on
> the Clover branch of Mesa.
>
> I read its code, which is very well-done and clean, but I saw one big
> difficulty : I don't know how to translate LLVM IR to TGSI. The big problem
> is that TGSI is made mostly with OpenGL in mind. We can use it to decode
> video frames using vertex and fragment shader stages, but using it to run
> on the GPU the complex output given by LLVM, and without using any part of
> the OpenGL pipeline (OpenCL can be used to do mathematics, and that
> doesn't draw anything on the screen), is tricky.
>
> The problem is how OpenCL can upload data on the GPU and then download the
> computed results. One solution may be to create one or more textures
> containing the input data (maybe one texture by input data type), and then
> use a fragment shader to compute the resulting values and to put them in a
> render buffer that will never be drawn on screen but instead downloaded
> from the GPU and sent back to the application.
>
> I don't know if it would be possible to do things like that, especially
> considering that precise results across all graphics cards may be difficult
> to get with OpenGL. An other problem of this LLVM to TGSI conversion is
> that the TGSI instruction set is not completely implemented on all the
> pipe drivers, and that unimplemented instructions may be needed by a
> specific LLVM IR instruction.
>
> I'm open to any suggestion regarding this OpenCL state tracker. If you say
> it will be very difficult to do that during the summer, I think I will
> apply to work on the OpenGL 3+ support in Mesa (without doing a new state
> tracker) and the GLSL compiler.
>
> Best regards,
> Denis Steckelmacher.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list