dolphin-emu/dolphin — pull request #1379 by crudelios (2014-10-23 19:55:56+00:00)
Title: Fix bbox related performance issue in some games.

Some games, such as Resident Evil Archives, clear the Bounding Box registers, thus turning on bbox, but never read those registers, which results in very slow performance for no benefit.

This PR fixes that by disabling bbox calculation when the bbox registers have been cleared but not read for three consecutive times, and by re-enabling bbox any time the registers are read.

The reason for allowing bbox regs to be cleared three times before disabling calculation is due to the fact that during boot every game clears the bbox registers twice without reading them. This allows games to clear bbox one final time, when already ingame, before disabling calculations.

This PR should fix issue #7774 without any impact on games that do use bbox.