DX11 code maintenance, part 4:

Move blend state management from EmuGfxState to Renderer.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6905 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2011-01-24 10:42:43 +00:00
parent cd5a2e4cc5
commit e0c6092721
10 changed files with 143 additions and 171 deletions

View File

@ -212,8 +212,6 @@ void VertexManager::vFlush()
bool useDstAlpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate &&
bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24;
D3D::gfxstate->SetDstAlpha(useDstAlpha);
if (!PixelShaderCache::SetShader(
useDstAlpha ? DSTALPHA_DUAL_SOURCE_BLEND : DSTALPHA_NONE,
g_nativeVertexFmt->m_components))
@ -231,14 +229,15 @@ void VertexManager::vFlush()
g_nativeVertexFmt->SetupVertexPointers();
D3D::gfxstate->ApplyState();
g_renderer->ApplyState();
g_renderer->ApplyState(useDstAlpha);
LoadBuffers();
Draw(stride);
g_renderer->RestoreState();
D3D::gfxstate->Reset();
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
g_renderer->RestoreState();
D3D::gfxstate->Reset();
shader_fail:
ResetBuffer();
}