[LLVMdev] LLVM as an OpenGL backend

Owen Anderson resistor at mac.com
Wed Feb 11 08:17:49 PST 2015


> On Feb 11, 2015, at 11:06 AM, Sam Kellett <samkellett at gmail.com> wrote:
> 
> Would it be feasible to compile LLVM IR into shading language assembler? If so, is this already being done?

It would certainly be possible for a restricted subset of LLVM IR, but non-trivial.  GLSL and HLSL are fairly restrictive languages compared to, say, C, and many operations in LLVM IR would be very difficult to express in them.

In general, GLSL and HLSL are much more similar to each other than they are to LLVM IR, so your life would likely be much better if you defined some intermediate form between the two than trying to round-trip through LLVM IR.

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150211/7e433ef3/attachment.html>


More information about the llvm-dev mailing list