dri: Fix driWaitForMSC32 when divisor >= 2 and msc < 0.
authorEric Anholt <eric@anholt.net>
Wed, 24 Dec 2008 00:08:40 +0000 (16:08 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 29 Dec 2008 20:09:24 +0000 (12:09 -0800)
commit6c01500228014a6cfa133b5dbba8c6d024833e84
treebd8878052fbf69b8dd1146c7a5693f72ea9b27fc
parentc40cd2ccdd8ce7f749d03e66bcca297c2366c1f9
dri: Fix driWaitForMSC32 when divisor >= 2 and msc < 0.

We'd come up with a negative remainder, while we were looking for the positive
version of it in the loop conditional.  And, since the "did we hit our target"
break was disabled for the target_msc == 0 ("Just make the divisor/remainder
work") path, we'd never exit.

Simplify the code by just using int64_t all over instead of trying to do it
in a u32 space.
src/mesa/drivers/dri/common/vblank.c