diff options
| author | Yuriy O'Donnell <yuriyo@gmail.com> | 2014-10-16 18:27:43 +0200 |
|---|---|---|
| committer | Yuriy O'Donnell <yuriyo@gmail.com> | 2014-10-16 18:27:43 +0200 |
| commit | 9bdfd4a833ffbd95f7636fb42db0004a896621b1 (patch) | |
| tree | 8ea5db004a66727dc20070583b2638dcbb0d7b70 /Source/Core/VideoBackends/D3D/D3DState.cpp | |
| parent | bea68c95a45a02ae616a817a248b28eb3f270e6e (diff) | |
D3D: State cache now reduces number of blend state permutations by collapsing some states that have blending disabled
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DState.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DState.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DState.cpp b/Source/Core/VideoBackends/D3D/D3DState.cpp index 67436df56f..f24532b385 100644 --- a/Source/Core/VideoBackends/D3D/D3DState.cpp +++ b/Source/Core/VideoBackends/D3D/D3DState.cpp @@ -172,6 +172,14 @@ ID3D11SamplerState* StateCache::Get(SamplerState state) ID3D11BlendState* StateCache::Get(BlendState state) { + if (!state.blend_enable) + { + state.src_blend = D3D11_BLEND_ONE; + state.dst_blend = D3D11_BLEND_ZERO; + state.blend_op = D3D11_BLEND_OP_ADD; + state.use_dst_alpha = false; + } + auto it = m_blend.find(state.packed); if (it != m_blend.end()) |
