diff options
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DState.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DState.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DState.cpp b/Source/Core/VideoBackends/D3D/D3DState.cpp index 5bd95bc8f3..9627ae2019 100644 --- a/Source/Core/VideoBackends/D3D/D3DState.cpp +++ b/Source/Core/VideoBackends/D3D/D3DState.cpp @@ -315,9 +315,11 @@ ID3D11SamplerState* StateCache::Get(SamplerState state) ID3D11SamplerState* res = nullptr; HRESULT hr = D3D::device->CreateSamplerState(&sampdc, &res); - if (FAILED(hr)) PanicAlert("Fail %s %d\n", __FILE__, __LINE__); + if (FAILED(hr)) + PanicAlert("Fail %s %d\n", __FILE__, __LINE__); + D3D::SetDebugObjectName((ID3D11DeviceChild*)res, "sampler state used to emulate the GX pipeline"); - m_sampler.insert(std::make_pair(state.packed, res)); + m_sampler.emplace(state.packed, res); return res; } @@ -394,9 +396,11 @@ ID3D11BlendState* StateCache::Get(BlendState state) ID3D11BlendState* res = nullptr; HRESULT hr = D3D::device->CreateBlendState(&blenddc, &res); - if (FAILED(hr)) PanicAlert("Failed to create blend state at %s %d\n", __FILE__, __LINE__); + if (FAILED(hr)) + PanicAlert("Failed to create blend state at %s %d\n", __FILE__, __LINE__); + D3D::SetDebugObjectName((ID3D11DeviceChild*)res, "blend state used to emulate the GX pipeline"); - m_blend.insert(std::make_pair(state.packed, res)); + m_blend.emplace(state.packed, res); return res; } @@ -415,9 +419,11 @@ ID3D11RasterizerState* StateCache::Get(RasterizerState state) ID3D11RasterizerState* res = nullptr; HRESULT hr = D3D::device->CreateRasterizerState(&rastdc, &res); - if (FAILED(hr)) PanicAlert("Failed to create rasterizer state at %s %d\n", __FILE__, __LINE__); + if (FAILED(hr)) + PanicAlert("Failed to create rasterizer state at %s %d\n", __FILE__, __LINE__); + D3D::SetDebugObjectName((ID3D11DeviceChild*)res, "rasterizer state used to emulate the GX pipeline"); - m_raster.insert(std::make_pair(state.packed, res)); + m_raster.emplace(state.packed, res); return res; } @@ -466,10 +472,12 @@ ID3D11DepthStencilState* StateCache::Get(ZMode state) ID3D11DepthStencilState* res = nullptr; HRESULT hr = D3D::device->CreateDepthStencilState(&depthdc, &res); - if (SUCCEEDED(hr)) D3D::SetDebugObjectName((ID3D11DeviceChild*)res, "depth-stencil state used to emulate the GX pipeline"); - else PanicAlert("Failed to create depth state at %s %d\n", __FILE__, __LINE__); + if (SUCCEEDED(hr)) + D3D::SetDebugObjectName((ID3D11DeviceChild*)res, "depth-stencil state used to emulate the GX pipeline"); + else + PanicAlert("Failed to create depth state at %s %d\n", __FILE__, __LINE__); - m_depth.insert(std::make_pair(state.hex, res)); + m_depth.emplace(state.hex, res); return res; } |
