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.