D3D12: Fix crash/errors when switching MSAA modes while running

This commit is contained in:
Stenzek
2016-02-21 18:55:55 +10:00
parent 1d909ec7a4
commit 9efe66509d
3 changed files with 28 additions and 4 deletions

View File

@ -461,6 +461,18 @@ HRESULT StateCache::GetPipelineStateObjectFromCache(SmallPsoDesc* pso_desc, ID3D
return S_OK;
}
void StateCache::OnMSAASettingsChanged()
{
for (auto& it : m_small_pso_map)
{
SAFE_RELEASE(it.second);
}
m_small_pso_map.clear();
// Update sample count for new PSOs being created
gx_state_cache.m_current_pso_desc.SampleDesc.Count = g_ActiveConfig.iMultisamples;
}
void StateCache::Clear()
{
for (auto& it : m_pso_map)