[PATCH 5/5] d3dcompiler: Parse variable declarations.

Rico Schüller kgbricola at web.de
Tue Jun 5 07:11:20 CDT 2012


Am 05.06.2012 13:08, schrieb Matteo Bruni:
> 2012/6/5 Stefan Dösinger<stefandoesinger at gmx.at>:
>> Am Montag, 4. Juni 2012, 17:58:24 schrieb Matteo Bruni:
>>> +struct hlsl_type
>>> +{
>>> ...
>>> +    unsigned int dimx;
>>> +    unsigned int dimy;
>>> ...
>>> +};
>> One thing I noticed when I wrote my compiler was that a float1x1 is not the
>> same as a float1 or float. I did not implement this difference nor do I know
>> if any games depend on it.
>>
>> (That's no reason to hold up this patch, just something to keep in mind for
>> further work)
>>
>
> Yeah, I noticed that too, but it doesn't seem to make much of a
> difference in practice. Of course, if later on it shows that it
> actually matters for something relevant, I'll change things
> accordingly.
>
>
>
For the effect interface, it makes a difference. See 
http://source.winehq.org/git/wine.git/blob/90f93e3819dcaa0cea16bd297fa69a359fb6b517:/dlls/d3dx9_36/tests/effect.c#l320 
and 
http://source.winehq.org/git/wine.git/blob/90f93e3819dcaa0cea16bd297fa69a359fb6b517:/dlls/d3dx9_36/tests/effect.c#l501 
. The difference is the type D3DXPC_SCALAR vs D3DXPC_VECTOR vs 
D3DXPC_MATRIX_ROWS and of course some different handling, see 
http://source.winehq.org/git/wine.git/blob/90f93e3819dcaa0cea16bd297fa69a359fb6b517:/dlls/d3dx9_36/tests/effect.c#l1191 
. A test may help to check how variables in shaders are handled.

Cheers
Rico



More information about the wine-devel mailing list