I saw on the LLVM mailing list some time ago that something like this was desired for Wine (but it was talking about an LLVM backend then). I figured I'd contact you guys to tell you that I found something like this, MojoShader by Ryan Gordon (zlib licensed).
http://icculus.org/mojoshader/
http://hg.icculus.org/icculus/mojoshader/
Sorry if someone already suggested this, or if something like this has already been implemented.
Generating OpenGL shaders from Direct3D shader bytecode
If I understand correctly wine needs both a HLSL compiler (for game providing source shaders) and a binary converter.nfries88 wrote:So you guys also need an actual HLSL compiler/frontend to MojoShader. Sorry then, I thought all you needed was a bytecode converter.
Wine already has its own binary converter, which is not - as far as I compared them - inferior to Ryan Gordon's one. Specifically, mojoshader does not support relative addressing with no CTAB, (nor zbuffer and pixel center issues), and output looked quite similar.