SwiftShader using LLVM

Hi all,

I thought some of you might be interested to know that TransGaming SwiftShader now features a back-end based on LLVM. SwiftShader is a high-performance 3D software rendering toolkit (http://transgaming.com/business/swiftshader/technology/). It has recently been licensed by Adobe for the Flash Molehill 3D API (http://labs.adobe.com/technologies/flash/molehill/).

That version doesn’t use LLVM though; it uses the much smaller and faster SwiftAsm back-end. However, the Direct3D 9 demo available from the TransGaming website fully relies on LLVM for dynamic code generation. You may be pleased to know that the generated code performs the same or faster than hand-tuned dynamically generated assembly code. LLVM’s optimization passes have been indispensable to achieve exceptional Shader Model 3.0 performance. On top of LLVM we’re using another abstraction layer, called Reactor, which defines a powerful high-level language.

If you decide to try out the demo, make sure to check out the SwiftConfig functionality. While running a Direct3D 9 application with SwiftShader in windowed mode, you can interactively change its settings by opening http://localhost:8080/swiftconfig in your browser. These settings include some LLVM optimization passes that can be selected or reordered!

So finally you know what my secret vector intensive project was. :wink: I’d like to thank all LLVM developers for providing this incredibly versatile compiler infrastructure, and I hope I’ll be able to contribute some more myself in the near future. If you have any questions about the use of LLVM in SwiftShader, feel free to ask!

Cheers,

Nicolas Capens

Lead SwiftShader Developer

TransGaming Inc.

Hi Nicolas,

I thought some of you might be interested to know that TransGaming SwiftShader
now features a back-end based on LLVM. SwiftShader is a high-performance 3D
software rendering toolkit

it sounds very nice - pity it's only for Windows!

Ciao,

Duncan.

Hi Duncan,

It's not just for Windows. Flash Molehill is up and running on Mac and Linux
as well, able to use SwiftShader as a software GPU. TransGaming also has
extensive expertise in OpenGL and general portability technology. So the new
release is really a toolkit that can be tailored to any platform.

That said, the current public demo only contains Direct3D 9 DLLs. We can't
release any OpenGL ES 2.0 builds yet because of licensing. But for the
record we did the original version of the Google ANGLE project which has an
OpenGL ES 2.0 API, using Direct3D hardware underneath (which is far more
challenging than having the flexibility of a software renderer).

So the O.S. and API are not an issue. And thanks to LLVM we hope to support
many more CPU architectures as well!

Cheers,

Nicolas

P.S.: If you want, you can use the Direct3D 9 demo on Linux with Cedega,
which also has a free demo.