diff options
| author | NeoBrainX <NeoBrainX@googlemail.com> | 2010-06-18 23:33:07 +0000 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@googlemail.com> | 2010-06-18 23:33:07 +0000 |
| commit | 5cfdb2d0c8aba7f7bc07a3c1f3ffec3e66cc20cb (patch) | |
| tree | d2d0f976eadc6977f7919c9f258da19c5423629f /Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp | |
| parent | b4f5a4d89e575a6d54188d55992643b93bde559d (diff) | |
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
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp index d0848a4c57..6db655a6d1 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp @@ -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(); } |
