Merge pull request #3361 from stenzek/d3d-vectored-efb-pokes

D3D: Implement vectored efb pokes
This commit is contained in:
Markus Wick
2015-12-30 15:27:24 +01:00
11 changed files with 140 additions and 61 deletions

View File

@ -44,7 +44,7 @@ void AsyncRequests::PullEventsInternal()
} while(!m_queue.empty() && m_queue.front().type == first_event.type);
lock.unlock();
g_renderer->PokeEFB(t, m_merged_efb_pokes);
g_renderer->PokeEFB(t, m_merged_efb_pokes.data(), m_merged_efb_pokes.size());
lock.lock();
continue;
}
@ -109,11 +109,17 @@ void AsyncRequests::HandleEvent(const AsyncRequests::Event& e)
switch (e.type)
{
case Event::EFB_POKE_COLOR:
g_renderer->AccessEFB(POKE_COLOR, e.efb_poke.x, e.efb_poke.y, e.efb_poke.data);
{
EfbPokeData poke = { e.efb_poke.x, e.efb_poke.y, e.efb_poke.data };
g_renderer->PokeEFB(POKE_COLOR, &poke, 1);
}
break;
case Event::EFB_POKE_Z:
g_renderer->AccessEFB(POKE_Z, e.efb_poke.x, e.efb_poke.y, e.efb_poke.data);
{
EfbPokeData poke = { e.efb_poke.x, e.efb_poke.y, e.efb_poke.data };
g_renderer->PokeEFB(POKE_Z, &poke, 1);
}
break;
case Event::EFB_PEEK_COLOR:

View File

@ -619,10 +619,3 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
XFBWrited = false;
}
void Renderer::PokeEFB(EFBAccessType type, const std::vector<EfbPokeData>& data)
{
for (EfbPokeData poke : data)
{
AccessEFB(type, poke.x, poke.y, poke.data);
}
}

View File

@ -116,7 +116,7 @@ public:
static void RenderToXFB(u32 xfbAddr, const EFBRectangle& sourceRc, u32 fbStride, u32 fbHeight, float Gamma = 1.0f);
virtual u32 AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) = 0;
virtual void PokeEFB(EFBAccessType type, const std::vector<EfbPokeData>& data);
virtual void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) = 0;
virtual u16 BBoxRead(int index) = 0;
virtual void BBoxWrite(int index, u16 value) = 0;