mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
D3D: State cache now reduces number of blend state permutations by collapsing some states that have blending disabled
This commit is contained in:
@ -172,6 +172,14 @@ ID3D11SamplerState* StateCache::Get(SamplerState state)
|
|||||||
|
|
||||||
ID3D11BlendState* StateCache::Get(BlendState 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);
|
auto it = m_blend.find(state.packed);
|
||||||
|
|
||||||
if (it != m_blend.end())
|
if (it != m_blend.end())
|
||||||
|
Reference in New Issue
Block a user