4 ms·
> DXIL, the intermediate representation used for DirectX 12, is based on LLVM-3.7 IR encoded as bitcode. For many reasons that have been discussed at length wit
by rjeli 5y ago
> DXIL, the intermediate representation used for DirectX 12, is based on LLVM-3.7 IR encoded as bitcode. For many reasons that have been discussed at length within the LLVM community in the past, this is not great, but it has already shipped and is the driver interface for all DirectX 12 GPU drivers.
ouch!
- ruph123 5y agoCan someone please explain why this is is problematic?
- hyperman1 5y agoI assume they can't upgrade to more recent LLVM versions, as the 3.7 bitcode is now found in a ton of published games. If they move to, say, 3.8, they need a LLVM 3.7 to 3.8 bitcode translator. Basically, microsoft published someone else's unstable, unsupported API.
- pjmlp 5y agoApple does the same with LLVM bitcode for watchOS, but apparently Microsoft doesn't want to control the whole stack.
- my123 5y ago> they need a LLVM 3.7 to 3.8 bitcode translator. LLVM IR provides upwards compatibility, that’s not what the issue is. The issue is rather having your game binaries not work at all on older OS/driver releases when built with a newer LLVM version.
- pjmlp 5y agoOn most 3D APIs, with exception of OpenGL (and its Web variants), shaders are shipped as binaries, so if the driver expects another version that game won't play.
- mijoharas 5y agoCould someone expand upon the reasons? I can think of a few off the top of my head (it ties you to an old llvm version) but at the same time, presumably you need to reduce the size on the wire of this format so you need some kind of bitcode, and since it seems to be a binary interface for GPU drivers which can't be changing regularly the choice seems as good as any other? Note: these are all naive uneducated assumptions on my part, as I'm not well informed in this area.
- saagarjha 5y agoYour tooling needs to continue to support an old LLVM version that nobody really cares about. It’s generally not a great place to be in.
- TazeTSchnitzel 5y agoLLVM IR is a complex, unstable, implementation-defined internal format used by LLVM with lots of quirks. While LLVM can consume LLVM bitcode made by previous versions of LLVM, it must be quite painful to use for any non-LLVM-based tooling. It's also not a portable format: the IR encodes many target-specific assumptions.