mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
rsx: Pause FIFO queue when changing ctrl registers
This commit is contained in:
parent
6891323c18
commit
0d0821e914
3 changed files with 28 additions and 0 deletions
|
@ -483,6 +483,14 @@ namespace rsx
|
|||
//Execute backend-local tasks first
|
||||
do_local_task();
|
||||
|
||||
//Wait for external pause events
|
||||
if (external_interrupt_lock.load())
|
||||
{
|
||||
external_interrupt_ack.store(true);
|
||||
while (external_interrupt_lock.load()) _mm_pause();
|
||||
}
|
||||
|
||||
//Now load the FIFO ctrl registers
|
||||
ctrl->get.store(internal_get.load());
|
||||
const u32 put = ctrl->put;
|
||||
|
||||
|
@ -2137,4 +2145,17 @@ namespace rsx
|
|||
{
|
||||
check_zcull_status(false, false);
|
||||
}
|
||||
|
||||
//Pause/cont wrappers for FIFO ctrl. Never call this from rsx thread itself!
|
||||
void thread::pause()
|
||||
{
|
||||
external_interrupt_lock.store(true);
|
||||
while (!external_interrupt_ack.load()) _mm_pause();
|
||||
external_interrupt_ack.store(false);
|
||||
}
|
||||
|
||||
void thread::unpause()
|
||||
{
|
||||
external_interrupt_lock.store(false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue