lightrec: Detect and speed up GPU status polling
authorPaul Cercueil <paul@crapouillou.net>
Sat, 19 Apr 2025 13:27:02 +0000 (15:27 +0200)
committernotaz <notasas@gmail.com>
Tue, 22 Apr 2025 22:07:18 +0000 (01:07 +0300)
commit397f72d9df69b4480160c8e08f252db89b5bc9ef
treed5963776c07c3812efb59b18436df96ecf196f1e
parent9dee89e97ac6d9fb76c09a1438a6a8269153e307
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>
libpcsxcore/lightrec/plugin.c