[d3d9] shademode_test: increase slop in color comparison

Dan Kegel dank at kegel.com
Mon May 12 15:54:18 CDT 2008


The test allowed for a slop of (-1,0) in the colors,
but on my machine,
nVidia Corporation NV17 [GeForce4 440 Go 64M]
the colors were off by +1.  So change the code
to allow for a slop of +-1, and switch to a more readable
way of comparing colors.

This gets rid of the following false negatives in d3d9/visual:

visual.c:6475: Test failed: GOURAUD shading has color0 000fc927,
expected 0x000dca28
visual.c:6480: Test failed: GOURAUD shading has color1 000e46c7,
expected 0x000d45c7
visual.c:6493: Test failed: PHONG shading has color0 000fc927,
expected 0x000dca28
visual.c:6498: Test failed: PHONG shading has color1 000e46c7,
expected 0x000d45c7
visual.c:6475: Test failed: GOURAUD shading has color0 000fc927,
expected 0x000dca28
visual.c:6480: Test failed: GOURAUD shading has color1 000d46c6,
expected 0x000d45c7
visual.c:6493: Test failed: PHONG shading has color0 000fc927,
expected 0x000dca28
visual.c:6498: Test failed: PHONG shading has color1 000d46c6,
expected 0x000d45c7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: visual.patch
Type: text/x-diff
Size: 3410 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080512/734b46f3/attachment.patch 


More information about the wine-patches mailing list