rsx: Pause FIFO queue when changing ctrl registers

This commit is contained in:
kd-11 2017-12-09 13:14:00 +03:00
parent 6891323c18
commit 0d0821e914
3 changed files with 28 additions and 0 deletions

View file

@ -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);
}
}