mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DX11: Introduce a StateManager class, might improve performance a little.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5740 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -561,9 +561,9 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, boo
|
||||
|
||||
// TODO: Use linear filtering if (bScaleByHalf), else use point filtering
|
||||
|
||||
D3D::context->OMSetBlendState(efbcopyblendstate, NULL, 0xffffffff);
|
||||
D3D::context->RSSetState(efbcopyraststate);
|
||||
D3D::context->OMSetDepthStencilState(efbcopydepthstate, 0);
|
||||
D3D::stateman->PushBlendState(efbcopyblendstate);
|
||||
D3D::stateman->PushRasterizerState(efbcopyraststate);
|
||||
D3D::stateman->PushDepthState(efbcopydepthstate);
|
||||
D3D::context->OMSetRenderTargets(1, &tex->GetRTV(), NULL);
|
||||
D3D::drawShadedTexQuad(
|
||||
(bFromZBuffer) ? FBManager.GetEFBDepthTexture()->GetSRV() : FBManager.GetEFBColorTexture()->GetSRV(),
|
||||
@ -573,5 +573,8 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, boo
|
||||
(bFromZBuffer) ? PixelShaderCache::GetDepthMatrixProgram() : PixelShaderCache::GetColorMatrixProgram(), VertexShaderCache::GetSimpleVertexShader(), VertexShaderCache::GetSimpleInputLayout());
|
||||
|
||||
D3D::context->OMSetRenderTargets(1, &FBManager.GetEFBColorTexture()->GetRTV(), FBManager.GetEFBDepthTexture()->GetDSV());
|
||||
D3D::stateman->PopBlendState();
|
||||
D3D::stateman->PopDepthState();
|
||||
D3D::stateman->PopRasterizerState();
|
||||
Renderer::RestoreAPIState();
|
||||
}
|
||||
|
Reference in New Issue
Block a user