[PATCH 1/6] d3dx9: add test for preshader in effect.
Paul Gofman
gofmanp at gmail.com
Wed Mar 9 09:34:16 CST 2016
PS Besides there is an issue with Inf and Nan FP comparison. There are
currently no NANs in this table, but there are some INFs. I thought it
is safer to compare these as integers, otherwise explicit testing for
Nan (and possibly for Inf, though not strictly necessary) will be required.
On 03/09/2016 06:26 PM, Paul Gofman wrote:
> Thank you for the review. I will fix that, and resubmit probably after I
> get the comments from Matteo for the other patches in the series.
> Regarding D3DXVECTOR4, it has floats. I wanted to compare exact values.
> I can of course convert all these values to text float representation,
> but this what I intentionally avoided doing not to deal with potential
> rounding problems when initializing these constants. Maybe there is some
> better way for exact float results matching?
>
> On 03/09/2016 05:48 PM, Henri Verbeet wrote:
>> +}
>> +test_effect_preshader_op_results[] =
>> +{
>> + {"1 / op", {1, 1, 1, 1}, {0x7f800000, 0xff800000, 0xbee8ba2e, 0x00200000}},
>> + {"rsq", {1, 1, 3, 3}, {0x7f800000, 0x7f800000, 0x3f2c985d, 0x1f800000}},
>> + {"mul", {1, 1, 1, 1}, {0x00000000, 0x80000000, 0x40d33334, 0x7f800000}},
>> + {"add", {0, 1, 1, 1}, {0x3f800000, 0x40000000, 0xc0a66666, 0x7f7fffff}},
>> + {"lt", {0, 0, 1, 0}, {0x3f800000, 0x3f800000, 0x00000000, 0x00000000}},
>> + {"ge", {1, 1, 0, 1}, {0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
>> + {"neg", {1, 1, 1, 1}, {0x80000000, 0x00000000, 0x400ccccd, 0xff7fffff}},
>> + {"rcp", {1, 1, 1, 1}, {0x7f800000, 0xff800000, 0xbee8ba2e, 0x00200000}},
>> + {"frac", {0, 0, 1, 0}, {0x00000000, 0x00000000, 0x3f4ccccc, 0x00000000}},
>> + {"min", {0, 1, 1, 1}, {0x00000000, 0x80000000, 0xc0400000, 0x40800000}},
>> + {"max", {1, 1, 1, 1}, {0x3f800000, 0x40000000, 0xc00ccccd, 0x7f7fffff}},
>> + {"sin", {0, 1, 1, 3}, {0x00000000, 0x80000000, 0xbf4ef99e, 0xbf0599b3}},
>> + {"cos", {1, 1, 1, 3}, {0x3f800000, 0x3f800000, 0xbf16a803, 0x3f5a5f96}},
>> + {"den mul",{1, 1, 1, 1}, {0x7f800000, 0xff800000, 0xbb94f209, 0x000051ec}},
>> + {"dot", {0, 1, 1, 0}, {0x00000000, 0x7f800000, 0x41f00000, 0x00000000}}
>> +};
>> These should all be const. I'd probably use D3DXVECTOR4 for the float
>> constant arrays.
>>
>
More information about the wine-devel
mailing list