Re: [PATCH 5/5] d3d9/tests: D3DCMP_GREATER is broken on r500.
On 12 September 2013 12:23, Stefan Dösinger <stefan(a)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"?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2013-09-12 12:44, schrieb Henri Verbeet:
On 12 September 2013 12:23, Stefan Dösinger <stefan(a)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-----
On 12 September 2013 13:33, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-09-12 12:44, schrieb Henri Verbeet:
On 12 September 2013 12:23, Stefan Dösinger <stefan(a)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.
I really just meant the typo in the comment.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2013-09-12 13:36, schrieb Henri Verbeet:
I really just meant the typo in the comment. Ah yes, that should be "distorted".
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSMafeAAoJEN0/YqbEcdMwEuUQAIYa1wxf92DwRVItKXcYwaYv AFVAAP4eCzkf7txTnIXVpcIQNy+GhvsjBNy0uAG2yqAYktFujPu4XxViuLaWnj9q ubzpnarMq7bP7+ew9fU2sdMNSlCe+lCrCOpjOCPkSvECaXEN6mpalmrDBiaNZ4v7 GJ3edD39gOiIhQpr5gVHEsdUp0NyrFoF0Gt8HcCP42iu4QuHKKic+8G7iev2wdxB L5QMYkl2Dqew5LP2FJ8gWAsYkLJyu4PAJm45sBYEGaX64cHMdAA9U2mDDu9SeJOW kBtnAYRIW9WBJC75hvL9HTvfb6fT2utHdyl3HRSMH1YIFzHnt8RxU/48OyktTZ8p MtCN3otEYeNoQrA11EU+HGh/kQUi7qQxa7vaSSmvzh5LeLUVpKRtH2dHXEIr5OWM X30qRBecS84epWHjhPXD3FmpBRq5p5A8AGDh9x/JYctvamHoCDZhAbg4sZCPxfP7 H1YDdhL4AZYuZCkMgcZgllELN3TS4c/lr+FRiW/qcuDTID+A+ojrruxEDAJjrxmF XevQGW42l622/XNv4AWZ5o0laxdimJiKHdnBxFm4LXTZlhueowPpFYCM1hyUqUmt 9dFTmNsjG5YFd4jX6shIu57SsIpDkVM9h9j3OyTRfzi9vHdZWG1NEx/iKHWEAZSO 9phzspBehOeheTiYjjCV =jFVG -----END PGP SIGNATURE-----
participants (2)
-
Henri Verbeet -
Stefan Dösinger