-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2013-09-12 12:44, schrieb Henri Verbeet: > On 12 September 2013 12:23, Stefan Dösinger > <ste...@codeweavers.com> wrote: >> + * On the r500 driver on Windows D3DCMP_GREATER and >> D3DCMP_GREATEREQUAL are broken for depth + * values > 0.5. >> The range appears to be distored, apparently an incoming value of >> ~0.875 is > "distorted"? Sorry, I wasn't able to find out what the driver is doing exactly. Everything seems ok when the value in the Z buffer and the incoming fragment's Z are 0.5 or smaller. At first I thought D3DCMP_GREATER is broken in general and behaves like D3DCMP_NEVER - that was when I investigated the failure in the d3d8 version of this test. On closer inspection it turned out that 0.5000001 is roughly equal to 0.0877, and 0.95 roughly matches the 0.75 we write into the buffer with the clear call. (The numbers are from my memory, they may be a bit off.)
D3DCMP_LESS works correctly. I think D3DCMP_GREATER also produces expected results when just comparing geometry Z vs geometry Z, so a game that uses it and doesn't depend on a match with the clear value should still work, maybe with reduced precision. D3DCMP_GREATEREQUAL has the same bug as D3DCMP_GREATER. D3DCMP_LESSEQUAL works ok as well. After two hours of trying to find out what the driver does I decided it's not worth the time and marked the tests broken. It is after all a no longer maintained Windows driver. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSMaaBAAoJEN0/YqbEcdMwX6sP/jGI6S2Xjsan6U17f+NqGPs9 D6rT0MoQsFW1SPkv3hidjcaIbMfZchpoGs27VySmPK0YvhDPjgaMNbH5SDJKMh0A 6vYTSmAKBL68xLJLR1u0c4F1iofnt01l6LhdUstHt4YGcZyZVXawaSn8fJ9Pry4N Pg+Y/3uli8zAiT4Gm0lsBm8fxyFPFhZB8gWwOT6fgt/c59p2W/wT0JUf2GEj1Pk1 m+cieaTckKgZ77RVDWOtv+FfKHjmOEPgWSGAf42D9Mp7qpKHKFMM0taliFKfB4oj vktcX4yvw+8afMcO4MLIkcZZOv8jmr/KwK5ySrlKdw9h15ONFIPmBqJ2uDErLhWy 8//KenelM1OVpOH0F/j93yWNr6NyqGkXbNvwlJSoKWbxHCBrhoSzyR+p4MxhFX/4 x9dGy2ZKFwz1gmWYpHmUdNOMc6snwxMGU0I+uy5WrBKBdevTMcwR6meEFa49dguC F96uDIxwbg3nO/3nacoeENgqjPw6aiDmYM3C+eURNjPJ1NPqFLUlAmT60yQA3jaS LYIgvhHbuyNfw6RWFCF/q7u8XlHSdTjwL/HY8xWu6zWtZmeIVsOqkyKdgjRxcvlF OUCseQp5swgP+lTolC6nMNiqwclmMHYaVNPeZr2a5xM7pCfFIDsOj0NTEaI3sjzX gq3mhzK0w+Ru25qPxAiP =/uUv -----END PGP SIGNATURE-----