[PATCH 5/5] d3d9/tests: D3DCMP_GREATER is broken on r500.

Henri Verbeet hverbeet at gmail.com
Thu Sep 12 06:36:54 CDT 2013


On 12 September 2013 13:33, Stefan Dösinger <stefan at 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 at 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.



More information about the wine-devel mailing list