diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-05-25 23:26:39 -0400 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-05-25 23:26:39 -0400 |
| commit | dad5d8e13d32b9678ef40ce329da371a7f82a779 (patch) | |
| tree | b8030db50a1c8483c09e2ad79113b6e8608bcbff /Source/Core/VideoCommon/AsyncRequests.cpp | |
| parent | 3817dd0f914f3a5fa66c1974c6228d6102f46b5e (diff) | |
| parent | d91d93505710aaef711a2cbb1b3ca6b8cee66cfa (diff) | |
Merge pull request #2357 from degasus/ogl_efb_poke_merge
ogl: efb poke merge
Diffstat (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AsyncRequests.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp index a702bf01f6..993b6bce2c 100644 --- a/Source/Core/VideoCommon/AsyncRequests.cpp +++ b/Source/Core/VideoCommon/AsyncRequests.cpp @@ -20,7 +20,34 @@ void AsyncRequests::PullEventsInternal() while (!m_queue.empty()) { - const Event& e = m_queue.front(); + Event e = m_queue.front(); + + // try to merge as many efb pokes as possible + // it's a bit hacky, but some games render a complete frame in this way + if ((e.type == Event::EFB_POKE_COLOR || e.type == Event::EFB_POKE_Z)) + { + m_merged_efb_pokes.clear(); + Event first_event = m_queue.front(); + EFBAccessType t = first_event.type == Event::EFB_POKE_COLOR ? POKE_COLOR : POKE_Z; + + do + { + e = m_queue.front(); + + EfbPokeData d; + d.data = e.efb_poke.data; + d.x = e.efb_poke.x; + d.y = e.efb_poke.y; + m_merged_efb_pokes.push_back(d); + + m_queue.pop(); + } while(!m_queue.empty() && m_queue.front().type == first_event.type); + + lock.unlock(); + g_renderer->PokeEFB(t, m_merged_efb_pokes); + lock.lock(); + continue; + } lock.unlock(); HandleEvent(e); |
