<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 11, 2015, at 11:06 AM, Sam Kellett <<a href="mailto:samkellett@gmail.com" class="">samkellett@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Would it be feasible to compile LLVM IR into shading language assembler? If so, is this already being done?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br class=""><div class="">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.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">—Owen</div></body></html>