Commit eb6304e
committed
gx: fix application hang on GPU FIFO overflow
This fixes a bug which began to manifest itself after the switch to
Tuxedo, though we haven't been able to find anything wrong with Tuxedo's
implementation -- we cannot even rule out that this is due to a compiler
/ toolkit update, though this seems less likely.
The bug happens when the FIFO gets full and both the overflow and
underflow status bits are set: the overflow handler suspends (with
LWP_SuspendThread()) the graphical thread, which often is the
application main thread, after which the underflow handler is never
invoked anymore, so the graphical thread remains stopped. Other threads
continue to work (wiimotes do connect to the Wii). Why exactly the
underflow handler is not invoked anymore is unclear.
The solution (or rather workaround) is to clear both the FIFO overflow
bit (obviously) and the underflow one, despite the fact that this should
have already been done by the underflow handler.
Another workaround which has been shown to be working is adding an
`else` before the check for the overflow bits, in order not to
immediately invoke the overflow handler if we just invoked the underflow
one. Should we for some reason need to revert this commit, that is
another path that could be taken.
Fixes: #2621 parent 20d90e9 commit eb6304e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
0 commit comments