mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Second Stage: re implement zcomplock and correct all the logic error in PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions.
please test for regressions
This commit is contained in:
@ -154,7 +154,7 @@ void VertexManager::vFlush()
|
||||
VertexShaderManager::SetConstants();
|
||||
PixelShaderManager::SetConstants();
|
||||
|
||||
if (!PixelShaderCache::SetShader(DSTALPHA_NONE,g_nativeVertexFmt->m_components))
|
||||
if (!PixelShaderCache::SetShader(PSGRENDER_NORMAL,g_nativeVertexFmt->m_components))
|
||||
{
|
||||
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
|
||||
goto shader_fail;
|
||||
@ -175,8 +175,7 @@ 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))
|
||||
if (!PixelShaderCache::SetShader(PSGRENDER_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;
|
||||
@ -186,6 +185,20 @@ void VertexManager::vFlush()
|
||||
Draw(stride);
|
||||
g_renderer->RestoreState();
|
||||
}
|
||||
|
||||
bool useZcomploc = bpmem.zcontrol.zcomploc && bpmem.zmode.updateenable;
|
||||
if(useZcomploc)
|
||||
{
|
||||
if (!PixelShaderCache::SetShader(PSGRENDER_ZCOMPLOCK, g_nativeVertexFmt->m_components))
|
||||
{
|
||||
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
|
||||
goto shader_fail;
|
||||
}
|
||||
// update Depth only
|
||||
g_renderer->ApplyState(RSM_Zcomploc);
|
||||
Draw(stride);
|
||||
g_renderer->RestoreState();
|
||||
}
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
|
||||
|
||||
shader_fail:
|
||||
|
Reference in New Issue
Block a user