[PATCH 3/5] wined3d: Don't use the depth range clipping hack when minZ and maxZ are equal.

Stefan Dösinger stefandoesinger at gmx.at
Wed Jan 20 01:23:46 CST 2010

Am 19.01.2010 um 23:52 schrieb Henri Verbeet:
> -        if (!stateblock->device->untransformed)
> +        if (!stateblock->device->untransformed && minZ != maxZ)
My tests show that this is not needed, at least in d3d8 and d3d9. My (unsent) tests show that if you pass MinZ == MaxZ SetViewport adjusts one of them to make sure they're apart by at least 0.001. If the parameters are < 0.999 maxZ is incremented by 0.001, otherwise minZ is set to 0.999. (If my memory serves me right)

That said, I will be busy the next 2 weeks at university, so don't expect the test and a fix for SetViewport in in that time. Plus, I still haven't ported my tests to ddraw, which may behave differently. If it helps your work feel free to put the patch in in the meantime, although obviously it would be better to skip it to avoid forgetting about it later.

More information about the wine-devel mailing list