this is a dev commit, a cleanup in the pixel shader generator to make the generate code a lot cleaner and readable, and a little fill rate optimization when using alpha test, i don't thing any game is limited by fill rate but the code looks more cleaner and is ordered in the same way is executed in hardware.

please test, if any problem apears let me know

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4812 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-01-12 03:39:14 +00:00
parent 573a7f4d6e
commit 532ab905c4
3 changed files with 118 additions and 112 deletions

View File

@ -283,7 +283,7 @@ void Flush()
int stride = g_nativeVertexFmt->GetVertexStride();
g_nativeVertexFmt->SetupVertexPointers();
Draw(stride);
if (bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate)
@ -296,19 +296,13 @@ void Flush()
}
// update alpha only
D3D::SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA);
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, false);
D3D::dev->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA);
D3D::dev->SetRenderState(D3DRS_ALPHABLENDENABLE, false);
Draw(stride);
if (bpmem.blendmode.alphaupdate)
write = D3DCOLORWRITEENABLE_ALPHA;
if (bpmem.blendmode.colorupdate)
write |= D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE;
if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract)
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, true);
D3D::SetRenderState(D3DRS_COLORWRITEENABLE, write);
D3D::RefreshRenderState(D3DRS_COLORWRITEENABLE);
D3D::RefreshRenderState(D3DRS_ALPHABLENDENABLE);
}
DEBUGGER_PAUSE_AT(NEXT_FLUSH,true);