lightrec: Detect and speed up GPU status polling
If the GPUSTATUS_POLLING_THRESHOLD macro is set to a value > 0, the
Lightrec glue code will attempt to detect polling of the GPU status
register, with a polling interval in PSX cycles up to the threshold
configured.
This is still quite experimental, hence the reason why it's disabled by
default. However, this gives a huge speed boost (35% and above) when
running on Dreamcast, tested with a threshold value of 350, on games
that don't use the PSX CPU much and spend a lot of time waiting for
VSYNC.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>