[PATCH 4/5] d3dx9/tests: Add ID3DXConstantTable struct test.
Rico Schüller
kgbricola at web.de
Tue Jul 30 15:58:54 CDT 2013
Hi Matteo,
please see the attached patch.
On 25.07.2013 16:13, Matteo Bruni wrote:
> 2013/7/24 Rico Schüller <kgbricola at web.de>:
>> ---
>> dlls/d3dx9_36/tests/shader.c | 308
>> +++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 308 insertions(+)
>>
>
> This is okay, but as a followup can you add some tests with mixed-type
> structs? Something like:
>
> struct
> {
> float f;
> int i;
> bool b;
> };
>
> If you have already written tests of this kind, I'd like to know what
> does the compiler do in this case :)
>
Single variables could only have the tested types (I was not able to
generate other conversions than bool->bool, int->int, int->float,
bool->float, float->float). But I found a way to do it with structs and
there I found some issues. Hence this has to be fixed in wine, too.
Thanks for the nice question. :-)
Basically you got these for the struct:
1. D3DXRS_FLOAT4: if one variable is used as float or a float variable
is used or an int variable is used as bool (the compiler may do some
optimization), else #2
2. D3DXRS_BOOL: if a bool variable is used as bool (in an if clause),
else #3
3. D3DXRS_INT4
It looks like you could only do it that way with unused variables. I'm
not sure if this makes sense at all. Why would someone set an unused
variable? Maybe I missed something? Do you know anything else?
Cheers
Rico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: structs.patch
Type: text/x-patch
Size: 31111 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130730/846b84d0/attachment-0001.bin>
More information about the wine-devel
mailing list