mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 02:46:32 +00:00
d3dx9/tests: Use true spherical light values and relax expectations.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e04a1c4210
commit
07f7022fcc
1 changed files with 57 additions and 57 deletions
|
@ -3121,68 +3121,68 @@ static void test_D3DXSHEvalSphericalLight(void)
|
|||
static const float table[] =
|
||||
{
|
||||
/* Red colour. */
|
||||
3.01317239e+00f, -9.77240324e-01f, 2.24765277e+00f, -8.95803630e-01f, -1.22213947e-07f, 3.06645916e-07f,
|
||||
-3.36369283e-07f, 2.81092071e-07f, 1.06474305e-08f, 6.29281402e-02f, -4.27374065e-01f, 6.19212627e-01f,
|
||||
-3.04508984e-01f, 5.67611575e-01f, 3.72333601e-02f, -8.19167346e-02f, -4.70457762e-09f, -7.94764006e-08f,
|
||||
3.32868979e-07f, -3.08902315e-07f, 5.30925970e-10f, -2.83160460e-07f, -2.89999580e-08f, 1.03458447e-07f,
|
||||
-2.67952434e-08f, 1.24992710e-02f, -1.37487827e-02f, -1.48109317e-01f, 4.34345961e-01f, -2.45986164e-01f,
|
||||
-1.51757941e-01f, -2.25487292e-01f, -3.78407575e-02f, 1.92801371e-01f, -7.83071220e-02f, 7.97894225e-03f,
|
||||
3.01317163e+00f, -9.77240128e-01f, 2.24765220e+00f, -8.95803434e-01f, 3.25255224e-35f, -8.16094904e-35f,
|
||||
8.95199460e-35f, -7.48086982e-35f, -2.83366352e-36f, 6.29281376e-02f, -4.27374053e-01f, 6.19212543e-01f,
|
||||
-3.04508915e-01f, 5.67611487e-01f, 3.72333533e-02f, -8.19167317e-02f, 1.25205729e-36f, 2.11515287e-35f,
|
||||
-8.85884025e-35f, 8.22100105e-35f, -1.41290744e-37f, 7.53591749e-35f, 7.71793061e-36f, -2.75340121e-35f,
|
||||
7.13117824e-36f, 1.24992691e-02f, -1.37487792e-02f, -1.48109290e-01f, 4.34345843e-01f, -2.45986100e-01f,
|
||||
-1.51757946e-01f, -2.25487254e-01f, -3.78407442e-02f, 1.92801335e-01f, -7.83071154e-02f, 7.97894137e-03f,
|
||||
|
||||
4.02519643e-01f, -2.43653327e-01f, 5.60402632e-01f, -2.23348871e-01f, 1.62046894e-01f, -4.06590402e-01f,
|
||||
4.46001410e-01f, -3.72707844e-01f, -1.41177261e-02f, -4.31995131e-02f, 2.93387860e-01f, -4.25083041e-01f,
|
||||
2.09042251e-01f, -3.89659435e-01f, -2.55603138e-02f, 5.62349856e-02f, -4.68822848e-03f, -7.92002082e-02f,
|
||||
3.31712216e-01f, -3.07828844e-01f, 5.29080920e-04f, -2.82176435e-01f, -2.88991798e-02f, 1.03098914e-01f,
|
||||
-2.67021265e-02f, 7.24340184e-03f, -7.96750095e-03f, -8.58302265e-02f, 2.51706064e-01f, -1.42550439e-01f,
|
||||
-8.79446268e-02f, -1.30671218e-01f, -2.19289437e-02f, 1.11729540e-01f, -4.53794412e-02f, 4.62384429e-03f,
|
||||
4.02519645e-01f, -2.43653315e-01f, 5.60402600e-01f, -2.23348868e-01f, 1.62046875e-01f, -4.06590330e-01f,
|
||||
4.46001368e-01f, -3.72707796e-01f, -1.41177231e-02f, -4.31995198e-02f, 2.93387896e-01f, -4.25083048e-01f,
|
||||
2.09042241e-01f, -3.89659453e-01f, -2.55603144e-02f, 5.62349945e-02f, -4.68822967e-03f, -7.92002290e-02f,
|
||||
3.31712278e-01f, -3.07828893e-01f, 5.29052032e-04f, -2.82176480e-01f, -2.88991817e-02f, 1.03098934e-01f,
|
||||
-2.67021338e-02f, 7.24339502e-03f, -7.96749298e-03f, -8.58301461e-02f, 2.51705799e-01f, -1.42550295e-01f,
|
||||
-8.79445626e-02f, -1.30671101e-01f, -2.19289189e-02f, 1.11729432e-01f, -4.53794030e-02f, 4.62384030e-03f,
|
||||
|
||||
1.95445275e+00f, -8.56593668e-01f, 1.97016549e+00f, -7.85210848e-01f, 2.31033459e-01f, -5.79683959e-01f,
|
||||
6.35873020e-01f, -5.31376958e-01f, -2.01279204e-02f, 2.11104341e-02f, -1.43370718e-01f, 2.07726598e-01f,
|
||||
-1.02153301e-01f, 1.90416038e-01f, 1.24906348e-02f, -2.74805184e-02f, 6.33162493e-03f, 1.06962793e-01f,
|
||||
-4.47989494e-01f, 4.15734142e-01f, -7.14543217e-04f, 3.81089628e-01f, 3.90294008e-02f, -1.39238864e-01f,
|
||||
3.60621996e-02f, -4.47360286e-03f, 4.92081419e-03f, 5.30096702e-02f, -1.55456364e-01f, 8.80406797e-02f,
|
||||
5.43155447e-02f, 8.07039514e-02f, 1.35435509e-02f, -6.90053627e-02f, 2.80268304e-02f, -2.85573583e-03f,
|
||||
1.95445306e+00f, -8.56593659e-01f, 1.97016533e+00f, -7.85210840e-01f, 2.31033385e-01f, -5.79683751e-01f,
|
||||
6.35872835e-01f, -5.31376762e-01f, -2.01279127e-02f, 2.11104646e-02f, -1.43370917e-01f, 2.07726860e-01f,
|
||||
-1.02153423e-01f, 1.90416285e-01f, 1.24906507e-02f, -2.74805568e-02f, 6.33162467e-03f, 1.06962790e-01f,
|
||||
-4.47989495e-01f, 4.15734115e-01f, -7.14504011e-04f, 3.81089599e-01f, 3.90293960e-02f, -1.39238860e-01f,
|
||||
3.60622028e-02f, -4.47359268e-03f, 4.92080277e-03f, 5.30095505e-02f, -1.55456001e-01f, 8.80404774e-02f,
|
||||
5.43154350e-02f, 8.07037695e-02f, 1.35435180e-02f, -6.90052063e-02f, 2.80267699e-02f, -2.85572968e-03f,
|
||||
/* Green colour. */
|
||||
4.60838127e+00f, -1.49460280e+00f, 3.43758631e+00f, -1.37005258e+00f, -1.86915443e-07f, 4.68987878e-07f,
|
||||
-5.14447095e-07f, 4.29905526e-07f, 1.62843055e-08f, 9.62430239e-02f, -6.53630912e-01f, 9.47031021e-01f,
|
||||
-4.65719581e-01f, 8.68111789e-01f, 5.69451340e-02f, -1.25284418e-01f, -7.19523641e-09f, -1.21552148e-07f,
|
||||
5.09093695e-07f, -4.72438842e-07f, 8.12004408e-10f, -4.33068919e-07f, -4.43528769e-08f, 1.58230563e-07f,
|
||||
-4.09809608e-08f, 1.91165321e-02f, -2.10275482e-02f, -2.26520121e-01f, 6.64293766e-01f, -3.76214117e-01f,
|
||||
-2.32100368e-01f, -3.44862908e-01f, -5.78740984e-02f, 2.94872671e-01f, -1.19763829e-01f, 1.22030871e-02f,
|
||||
4.60837984e+00f, -1.49460245e+00f, 3.43758549e+00f, -1.37005222e+00f, 4.97449134e-35f, -1.24814507e-34f,
|
||||
1.36912850e-34f, -1.14413296e-34f, -4.33383805e-36f, 9.62430278e-02f, -6.53630863e-01f, 9.47030887e-01f,
|
||||
-4.65719486e-01f, 8.68111630e-01f, 5.69451249e-02f, -1.25284405e-01f, 1.91491103e-36f, 3.23493947e-35f,
|
||||
-1.35488136e-34f, 1.25732949e-34f, -2.16091711e-37f, 1.15255201e-34f, 1.18038931e-35f, -4.21108392e-35f,
|
||||
1.09065072e-35f, 1.91165280e-02f, -2.10275433e-02f, -2.26520076e-01f, 6.64293599e-01f, -3.76214011e-01f,
|
||||
-2.32100374e-01f, -3.44862837e-01f, -5.78740756e-02f, 2.94872611e-01f, -1.19763816e-01f, 1.22030860e-02f,
|
||||
|
||||
6.15618229e-01f, -3.72646272e-01f, 8.57086360e-01f, -3.41592401e-01f, 2.47836411e-01f, -6.21844113e-01f,
|
||||
6.82119787e-01f, -5.70023775e-01f, -2.15918161e-02f, -6.60698414e-02f, 4.48710799e-01f, -6.50126934e-01f,
|
||||
3.19711655e-01f, -5.95949709e-01f, -3.90922427e-02f, 8.60064477e-02f, -7.17023155e-03f, -1.21129729e-01f,
|
||||
5.07324517e-01f, -4.70797032e-01f, 8.09182529e-04f, -4.31563944e-01f, -4.41987440e-02f, 1.57680690e-01f,
|
||||
-4.08385433e-02f, 1.10781426e-02f, -1.21855885e-02f, -1.31269753e-01f, 3.84962171e-01f, -2.18018293e-01f,
|
||||
-1.34503528e-01f, -1.99850082e-01f, -3.35383788e-02f, 1.70880452e-01f, -6.94038495e-02f, 7.07176095e-03f,
|
||||
6.15618240e-01f, -3.72646222e-01f, 8.57086273e-01f, -3.41592364e-01f, 2.47836381e-01f, -6.21843994e-01f,
|
||||
6.82119695e-01f, -5.70023651e-01f, -2.15918104e-02f, -6.60698496e-02f, 4.48710870e-01f, -6.50126972e-01f,
|
||||
3.19711642e-01f, -5.95949713e-01f, -3.90922430e-02f, 8.60064566e-02f, -7.17023314e-03f, -1.21129754e-01f,
|
||||
5.07324627e-01f, -4.70797100e-01f, 8.09138350e-04f, -4.31564000e-01f, -4.41987457e-02f, 1.57680712e-01f,
|
||||
-4.08385549e-02f, 1.10781328e-02f, -1.21855767e-02f, -1.31269627e-01f, 3.84961785e-01f, -2.18018084e-01f,
|
||||
-1.34503440e-01f, -1.99849906e-01f, -3.35383443e-02f, 1.70880296e-01f, -6.94037884e-02f, 7.07175529e-03f,
|
||||
|
||||
2.98916292e+00f, -1.31008446e+00f, 3.01319408e+00f, -1.20091069e+00f, 3.53345245e-01f, -8.86575401e-01f,
|
||||
9.72511649e-01f, -8.12694073e-01f, -3.07838768e-02f, 3.22865434e-02f, -2.19272852e-01f, 3.17699492e-01f,
|
||||
-1.56234443e-01f, 2.91224509e-01f, 1.91033222e-02f, -4.20290269e-02f, 9.68366116e-03f, 1.63590148e-01f,
|
||||
-6.85160398e-01f, 6.35828674e-01f, -1.09283067e-03f, 5.82842946e-01f, 5.96920252e-02f, -2.12953553e-01f,
|
||||
5.51539510e-02f, -6.84198039e-03f, 7.52595067e-03f, 8.10736120e-02f, -2.37756789e-01f, 1.34650454e-01f,
|
||||
8.30708295e-02f, 1.23429567e-01f, 2.07136646e-02f, -1.05537608e-01f, 4.28645648e-02f, -4.36759600e-03f,
|
||||
2.98916331e+00f, -1.31008433e+00f, 3.01319384e+00f, -1.20091062e+00f, 3.53345154e-01f, -8.86575090e-01f,
|
||||
9.72511332e-01f, -8.12693818e-01f, -3.07838645e-02f, 3.22865908e-02f, -2.19273153e-01f, 3.17699883e-01f,
|
||||
-1.56234637e-01f, 2.91224888e-01f, 1.91033469e-02f, -4.20290842e-02f, 9.68366064e-03f, 1.63590138e-01f,
|
||||
-6.85160360e-01f, 6.35828606e-01f, -1.09277077e-03f, 5.82842878e-01f, 5.96920135e-02f, -2.12953537e-01f,
|
||||
5.51539537e-02f, -6.84196484e-03f, 7.52593316e-03f, 8.10734249e-02f, -2.37756221e-01f, 1.34650133e-01f,
|
||||
8.30706600e-02f, 1.23429287e-01f, 2.07136145e-02f, -1.05537368e-01f, 4.28644688e-02f, -4.36758628e-03f,
|
||||
/* Blue colour. */
|
||||
6.20359039e+00f, -2.01196527e+00f, 4.62752008e+00f, -1.84430146e+00f, -2.51616967e-07f, 6.31329840e-07f,
|
||||
-6.92524964e-07f, 5.78718982e-07f, 2.19211813e-08f, 1.29557922e-01f, -8.79887760e-01f, 1.27484941e+00f,
|
||||
-6.26930237e-01f, 1.16861200e+00f, 7.66569078e-02f, -1.68652087e-01f, -9.68589564e-09f, -1.63627888e-07f,
|
||||
6.85318469e-07f, -6.35975368e-07f, 1.09308285e-09f, -5.82977407e-07f, -5.97057976e-08f, 2.13002679e-07f,
|
||||
-5.51666766e-08f, 2.57337932e-02f, -2.83063166e-02f, -3.04930955e-01f, 8.94241691e-01f, -5.06442070e-01f,
|
||||
-3.12442809e-01f, -4.64238554e-01f, -7.79074430e-02f, 3.96944016e-01f, -1.61220551e-01f, 1.64272338e-02f,
|
||||
6.20358848e+00f, -2.01196491e+00f, 4.62751910e+00f, -1.84430114e+00f, 6.69643089e-35f, -1.68019534e-34f,
|
||||
1.84305766e-34f, -1.54017904e-34f, -5.83401297e-36f, 1.29557927e-01f, -8.79887732e-01f, 1.27484932e+00f,
|
||||
-6.26930101e-01f, 1.16861185e+00f, 7.66569017e-02f, -1.68652090e-01f, 2.57776494e-36f, 4.35472637e-35f,
|
||||
-1.82387882e-34f, 1.69255899e-34f, -2.90892699e-37f, 1.55151238e-34f, 1.58898567e-35f, -5.66876703e-35f,
|
||||
1.46818371e-35f, 2.57337886e-02f, -2.83063093e-02f, -3.04930882e-01f, 8.94241416e-01f, -5.06441957e-01f,
|
||||
-3.12442822e-01f, -4.64238452e-01f, -7.79074123e-02f, 3.96943914e-01f, -1.61220527e-01f, 1.64272318e-02f,
|
||||
|
||||
8.28716874e-01f, -5.01639187e-01f, 1.15377009e+00f, -4.59835887e-01f, 3.33625972e-01f, -8.37097943e-01f,
|
||||
9.18238282e-01f, -7.67339706e-01f, -2.90659070e-02f, -8.89401734e-02f, 6.04033828e-01f, -8.75170946e-01f,
|
||||
4.30381119e-01f, -8.02240014e-01f, -5.26241735e-02f, 1.15777917e-01f, -9.65223555e-03f, -1.63059264e-01f,
|
||||
6.82936907e-01f, -6.33765280e-01f, 1.08928420e-03f, -5.80951512e-01f, -5.94983101e-02f, 2.12262481e-01f,
|
||||
-5.49749658e-02f, 1.49128847e-02f, -1.64036769e-02f, -1.76709279e-01f, 5.18218338e-01f, -2.93486178e-01f,
|
||||
-1.81062460e-01f, -2.69028962e-01f, -4.51478213e-02f, 2.30031401e-01f, -9.34282616e-02f, 9.51967947e-03f,
|
||||
8.28716892e-01f, -5.01639163e-01f, 1.15377003e+00f, -4.59835891e-01f, 3.33625909e-01f, -8.37097715e-01f,
|
||||
9.18238085e-01f, -7.67339558e-01f, -2.90658997e-02f, -8.89401854e-02f, 6.04033886e-01f, -8.75170956e-01f,
|
||||
4.30381072e-01f, -8.02240028e-01f, -5.26241753e-02f, 1.15777927e-01f, -9.65223728e-03f, -1.63059290e-01f,
|
||||
6.82937023e-01f, -6.33765350e-01f, 1.08922474e-03f, -5.80951560e-01f, -5.94983136e-02f, 2.12262505e-01f,
|
||||
-5.49749798e-02f, 1.49128717e-02f, -1.64036616e-02f, -1.76709119e-01f, 5.18217807e-01f, -2.93485893e-01f,
|
||||
-1.81062330e-01f, -2.69028730e-01f, -4.51477729e-02f, 2.30031176e-01f, -9.34281801e-02f, 9.51967094e-03f,
|
||||
|
||||
4.02387333e+00f, -1.76357520e+00f, 4.05622292e+00f, -1.61661065e+00f, 4.75657105e-01f, -1.19346702e+00f,
|
||||
1.30915034e+00f, -1.09401131e+00f, -4.14398350e-02f, 4.34626564e-02f, -2.95174986e-01f, 4.27672386e-01f,
|
||||
-2.10315600e-01f, 3.92033011e-01f, 2.57160105e-02f, -5.65775372e-02f, 1.30356979e-02f, 2.20217496e-01f,
|
||||
-9.22331274e-01f, 8.55923176e-01f, -1.47111830e-03f, 7.84596264e-01f, 8.03546458e-02f, -2.86668241e-01f,
|
||||
7.42457062e-02f, -9.21035837e-03f, 1.01310881e-02f, 1.09137557e-01f, -3.20057213e-01f, 1.81260213e-01f,
|
||||
1.11826122e-01f, 1.66155189e-01f, 2.78837811e-02f, -1.42069861e-01f, 5.77022992e-02f, -5.87945618e-03f,
|
||||
4.02387383e+00f, -1.76357513e+00f, 4.05622263e+00f, -1.61661051e+00f, 4.75656955e-01f, -1.19346651e+00f,
|
||||
1.30914992e+00f, -1.09401095e+00f, -4.14398191e-02f, 4.34627200e-02f, -2.95175409e-01f, 4.27672935e-01f,
|
||||
-2.10315865e-01f, 3.92033517e-01f, 2.57160448e-02f, -5.65776154e-02f, 1.30356975e-02f, 2.20217502e-01f,
|
||||
-9.22331288e-01f, 8.55923154e-01f, -1.47103763e-03f, 7.84596211e-01f, 8.03546365e-02f, -2.86668233e-01f,
|
||||
7.42457096e-02f, -9.21033762e-03f, 1.01310642e-02f, 1.09137307e-01f, -3.20056463e-01f, 1.81259801e-01f,
|
||||
1.11825893e-01f, 1.66154815e-01f, 2.78837128e-02f, -1.42069538e-01f, 5.77021717e-02f, -5.87944329e-03f,
|
||||
};
|
||||
const struct
|
||||
{
|
||||
|
@ -3229,7 +3229,7 @@ static void test_D3DXSHEvalSphericalLight(void)
|
|||
expected = j + test[l].roffset;
|
||||
else
|
||||
expected = test[l].red_expected[j];
|
||||
equal = compare_float(expected, test[l].red_received[j], 2048);
|
||||
equal = compare_float(expected, test[l].red_received[j], 4096);
|
||||
ok(equal || (fabs(expected) < 1.0e-6f && fabs(test[l].red_received[j]) < 1.0e-6f),
|
||||
"Red: case %u, order %u: expected[%u] = %.8e, received %.8e.\n",
|
||||
l, order, j, expected, test[l].red_received[j]);
|
||||
|
@ -3240,7 +3240,7 @@ static void test_D3DXSHEvalSphericalLight(void)
|
|||
expected = j + test[l].goffset;
|
||||
else
|
||||
expected = test[l].green_expected[j];
|
||||
equal = compare_float(expected, test[l].green_received[j], 2048);
|
||||
equal = compare_float(expected, test[l].green_received[j], 4096);
|
||||
ok(equal || (fabs(expected) < 1.0e-6f && fabs(test[l].green_received[j]) < 1.0e-6f),
|
||||
"Green: case %u, order %u: expected[%u] = %.8e, received %.8e.\n",
|
||||
l, order, j, expected, test[l].green_received[j]);
|
||||
|
@ -3252,7 +3252,7 @@ static void test_D3DXSHEvalSphericalLight(void)
|
|||
expected = j + test[l].boffset;
|
||||
else
|
||||
expected = test[l].blue_expected[j];
|
||||
equal = compare_float(expected, test[l].blue_received[j], 2048);
|
||||
equal = compare_float(expected, test[l].blue_received[j], 4096);
|
||||
ok(equal || (fabs(expected) < 1.0e-6f && fabs(test[l].blue_received[j]) < 1.0e-6f),
|
||||
"Blue: case %u, order %u: expected[%u] = %.8e, received %.8e.\n",
|
||||
l, order, j, expected, test[l].blue_received[j]);
|
||||
|
|
Loading…
Reference in a new issue