HLSL compiler

Fabian Maurer dark.shadow4 at web.de
Thu Sep 1 20:33:45 CDT 2016


> Notice that fx_4_0 is the effects stuff. You probably want to start
> with plain shaders (i.e. vs_4_0 and the like).

Well, I'm working along a DX10 tutorial and slowly want to have each part 
work. It's just that they only use .fx files, they seem to contain both vertex- 
and pixelshader.


> I have a lot of code for SM2/3 shaders but it's nowhere near in shape
> for upstreaming and I probably won't have time for cleaning that up in
> the foreseeable future.
> I could publish the code somewhere as-is but, actually, ignoring my
> code's existence and restarting from what's upstream now is probably
> better anyway. I can give you (or anyone else interested) pointers and
> suggestions along the way though, to try and avoid the same pitfalls
> and issues I encountered while writing my code.

Since I don't know too much about the implementation yet, a few tips would be 
great.
Currently, I'm just toying with the parser to understand how it all works 
together.

Also, does it really not support function calls?
I'm currently trying to get that part to work, like built-in functions, but I 
somewhat can't believe that is missing.


> Yep, d3dcompiler API is supposed to handle all shader versions and the
> plan was to have one parser and really one compiler for everything
> (splitting out only the strictly necessary stuff, e.g. for writing SM4
> bytecode vs SM1 bytecode), sitting in d3dcompiler_43.dll. Ideally
> d3dx9, d3d10, d3dx10 and d3dx11 should all forward to d3dcompiler and
> everything should work fine.

Ah okey. I'll try to extend it and separate the functionality as needed then.





More information about the wine-devel mailing list