Revert Rodolfo's recent zcomploc commits until they actually work correctly.

This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
This commit is contained in:
NeoBrainX
2012-03-30 01:56:24 +02:00
parent f7c17c6351
commit 460610ea0e
16 changed files with 75 additions and 184 deletions

View File

@ -154,9 +154,11 @@ void VertexManager::vFlush()
VertexShaderManager::SetConstants();
PixelShaderManager::SetConstants();
int stride = g_nativeVertexFmt->GetVertexStride();
g_nativeVertexFmt->SetupVertexPointers();
if (!PixelShaderCache::SetShader(DSTALPHA_NONE,g_nativeVertexFmt->m_components))
{
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
if (!VertexShaderCache::SetShader(g_nativeVertexFmt->m_components))
{
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set vertex shader\n");});
@ -164,11 +166,8 @@ void VertexManager::vFlush()
}
if (!PixelShaderCache::SetShader(DSTALPHA_NONE,g_nativeVertexFmt->m_components))
{
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
int stride = g_nativeVertexFmt->GetVertexStride();
g_nativeVertexFmt->SetupVertexPointers();
Draw(stride);
@ -176,35 +175,17 @@ void VertexManager::vFlush()
bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24;
if (useDstAlpha)
{
DWORD write = 0;
if (!PixelShaderCache::SetShader(DSTALPHA_ALPHA_PASS, g_nativeVertexFmt->m_components))
{
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
// update alpha only
g_renderer->ApplyState(RSM_UseDstAlpha);
if (bpmem.zmode.updateenable)
g_renderer->ApplyState(RSM_Multipass);
g_renderer->ApplyState(true);
Draw(stride);
g_renderer->RestoreState(RSM_UseDstAlpha);
if (bpmem.zmode.updateenable)
g_renderer->RestoreState(RSM_Multipass);
g_renderer->RestoreState();
}
bool UseZcomploc = bpmem.zcontrol.zcomploc && bpmem.zmode.updateenable && !g_ActiveConfig.bEnableFastZcomploc;
if (UseZcomploc)
{
if (!PixelShaderCache::SetShader(DSTALPHA_ZCOMPLOC,g_nativeVertexFmt->m_components))
{
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
g_renderer->ApplyState(RSM_Zcomploc);
Draw(stride);
g_renderer->RestoreState(RSM_Zcomploc);
}
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
shader_fail: