DX11 plugin: Fix numerous Metroid Prime glitches. The "techno energy ball lighting" glitch is remains, however.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6293 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check 2010-10-20 02:29:20 +00:00
parent b1d6417f13
commit 479eea6ad2
1 changed files with 11 additions and 5 deletions

View File

@ -789,15 +789,21 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
D3D11_RECT sirc = CD3D11_RECT(targetRc.left, targetRc.top, targetRc.right, targetRc.bottom); D3D11_RECT sirc = CD3D11_RECT(targetRc.left, targetRc.top, targetRc.right, targetRc.bottom);
D3D::context->RSSetScissorRects(1, &sirc); D3D::context->RSSetScissorRects(1, &sirc);
u32 rgbaColor = (color & 0xFF00FF00) | ((color >> 16) & 0xFF) | ((color << 16) & 0xFF0000); u32 rgbaColor = (color & 0xFF00FF00) | ((color >> 16) & 0xFF) | ((color << 16) & 0xFF0000);
D3D::stateman->PushDepthState(cleardepthstates[zEnable]); D3D::stateman->PushDepthState(cleardepthstates[zEnable]);
D3D::stateman->PushRasterizerState(clearraststate); D3D::stateman->PushRasterizerState(clearraststate);
//D3D::stateman->PushBlendState(resetblendstate); temporarily commented until I find the cause of the blending issue in mkwii (see next line) D3D::stateman->PushBlendState(resetblendstate);
D3D::gfxstate->ApplyState(); // TODO (neobrain): find out whether this breaks/fixes anything or can just be dropped. Might obsolete the comment above this line D3D::stateman->Apply();
D3D::drawClearQuad(rgbaColor, (z & 0xFFFFFF) / float(0xFFFFFF), PixelShaderCache::GetClearProgram(), VertexShaderCache::GetClearVertexShader(), VertexShaderCache::GetClearInputLayout()); D3D::drawClearQuad(rgbaColor, (z & 0xFFFFFF) / float(0xFFFFFF), PixelShaderCache::GetClearProgram(), VertexShaderCache::GetClearVertexShader(), VertexShaderCache::GetClearInputLayout());
D3D::gfxstate->Reset();
D3D::stateman->PopDepthState(); D3D::stateman->PopBlendState();
D3D::stateman->PopRasterizerState(); D3D::stateman->PopRasterizerState();
// D3D::stateman->PopBlendState(); D3D::stateman->PopDepthState();
D3D::stateman->Apply();
D3D::gfxstate->Reset();
UpdateViewport(); UpdateViewport();
SetScissorRect(); SetScissorRect();
} }