GSdx: optimized the triangle setup of the rasterizer a bit, while it isn't the bottle-neck of drawing, it can still add a few percent to the fps.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4404 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 committed 2011-03-08 01:48:15 +00:00
1 parent b2319c7636
commit fe88ee4102
16 files changed
+397 -372

No files matched your search

@@ -268,14 +268,14 @@ void GSDrawScanlineCodeGenerator::Init()
// GSVector2i* fza_base = &m_local.gd->fzbr[top];
mov(esi, dword[esp + _top]);
mov(esi, ptr[esp + _top]);
lea(esi, ptr[esi * 8]);
add(esi, dword[&m_local.gd->fzbr]);
add(esi, ptr[&m_local.gd->fzbr]);
// GSVector2i* fza_offset = &m_local.gd->fzbc[left >> 2];
lea(edi, ptr[ebx * 2]);
add(edi, dword[&m_local.gd->fzbc]);
add(edi, ptr[&m_local.gd->fzbc]);
if(!m_sel.sprite && (m_sel.fwrite && m_sel.fge || m_sel.zb) || m_sel.fb && (m_sel.edge || m_sel.tfx != TFX_NONE || m_sel.iip))
{
@@ -286,7 +286,7 @@ void GSDrawScanlineCodeGenerator::Init()
// ebx = &v
mov(ebx, dword[esp + _v]);
mov(ebx, ptr[esp + _v]);
}
if(!m_sel.sprite)
@@ -587,8 +587,8 @@ void GSDrawScanlineCodeGenerator::TestZ(const Xmm& temp1, const Xmm& temp2)
// int za = fza_base.y + fza_offset->y;
mov(ebp, dword[esi + 4]);
add(ebp, dword[edi + 4]);
mov(ebp, ptr[esi + 4]);
add(ebp, ptr[edi + 4]);
// GSVector4i zs = zi;
@@ -684,7 +684,7 @@ void GSDrawScanlineCodeGenerator::SampleTexture()
return;
}
mov(ebx, dword[&m_local.gd->tex]);
mov(ebx, ptr[&m_local.gd->tex]);
// ebx = tex
@@ -1495,8 +1495,8 @@ void GSDrawScanlineCodeGenerator::ReadFrame()
// int fa = fza_base.x + fza_offset->x;
mov(ebx, dword[esi]);
add(ebx, dword[edi]);
mov(ebx, ptr[esi]);
add(ebx, ptr[edi]);
if(!m_sel.rfb)
{
@@ -1875,7 +1875,7 @@ void GSDrawScanlineCodeGenerator::WriteFrame()
if(m_sel.fpsm == 2 && m_sel.dthe)
{
mov(eax, dword[esp + _top]);
mov(eax, ptr[esp + _top]);
and(eax, 3);
shl(eax, 5);
paddw(xmm5, ptr[eax + (size_t)&m_local.gd->dimx[0]]);