Generating OpenGL shaders from Direct3D shader bytecode

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
nfries88
Newbie
Newbie
Posts: 2
Joined: Mon Jul 18, 2011 4:06 pm

Generating OpenGL shaders from Direct3D shader bytecode

Post by nfries88 »

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.
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

I think the d3d developers are aware of mojoshader.
It doesn't generate bytecode from hlsl yet (it's *really hard* to do),
so it's not much use to wine yet.
nfries88
Newbie
Newbie
Posts: 2
Joined: Mon Jul 18, 2011 4:06 pm

Post by nfries88 »

So you guys also need an actual HLSL compiler/frontend to MojoShader. Sorry then, I thought all you needed was a bytecode converter.
Nonal
Newbie
Newbie
Posts: 1
Joined: Tue Jul 19, 2011 2:29 pm

Post by Nonal »

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.
If I understand correctly wine needs both a HLSL compiler (for game providing source shaders) and a binary 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.
Locked