mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Avoid recursion in flip handler
This commit is contained in:
parent
7818d0767b
commit
1a892c6b1b
2 changed files with 10 additions and 0 deletions
|
@ -2604,6 +2604,12 @@ namespace rsx
|
||||||
|
|
||||||
void thread::handle_emu_flip(u32 buffer)
|
void thread::handle_emu_flip(u32 buffer)
|
||||||
{
|
{
|
||||||
|
if (m_queued_flip.in_progress)
|
||||||
|
{
|
||||||
|
// Rescursion not allowed!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_queued_flip.buffer == ~0u)
|
if (m_queued_flip.buffer == ~0u)
|
||||||
{
|
{
|
||||||
// Frame was not queued before flipping
|
// Frame was not queued before flipping
|
||||||
|
@ -2653,13 +2659,16 @@ namespace rsx
|
||||||
int_flip_index++;
|
int_flip_index++;
|
||||||
|
|
||||||
verify(HERE), m_queued_flip.buffer == buffer;
|
verify(HERE), m_queued_flip.buffer == buffer;
|
||||||
|
|
||||||
current_display_buffer = buffer;
|
current_display_buffer = buffer;
|
||||||
m_queued_flip.emu_flip = true;
|
m_queued_flip.emu_flip = true;
|
||||||
|
m_queued_flip.in_progress = true;
|
||||||
flip(m_queued_flip);
|
flip(m_queued_flip);
|
||||||
|
|
||||||
last_flip_time = get_system_time() - 1000000;
|
last_flip_time = get_system_time() - 1000000;
|
||||||
flip_status = CELL_GCM_DISPLAY_FLIP_STATUS_DONE;
|
flip_status = CELL_GCM_DISPLAY_FLIP_STATUS_DONE;
|
||||||
m_queued_flip.buffer = ~0u;
|
m_queued_flip.buffer = ~0u;
|
||||||
|
m_queued_flip.in_progress = false;
|
||||||
|
|
||||||
if (flip_handler)
|
if (flip_handler)
|
||||||
{
|
{
|
||||||
|
|
|
@ -428,6 +428,7 @@ namespace rsx
|
||||||
u32 buffer;
|
u32 buffer;
|
||||||
bool skip_frame;
|
bool skip_frame;
|
||||||
bool emu_flip;
|
bool emu_flip;
|
||||||
|
bool in_progress;
|
||||||
frame_statistics_t stats;
|
frame_statistics_t stats;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue