D3D: Eliminate redundant ID3D11DeviceChild* casts

This commit is contained in:
Lioncash
2017-09-02 14:22:18 -04:00
parent 1191280e76
commit 64de8a9d0b
12 changed files with 85 additions and 104 deletions

View File

@ -345,7 +345,7 @@ ID3D11SamplerState* StateCache::Get(SamplerState state)
if (FAILED(hr))
PanicAlert("Fail %s %d\n", __FILE__, __LINE__);
D3D::SetDebugObjectName((ID3D11DeviceChild*)res, "sampler state used to emulate the GX pipeline");
D3D::SetDebugObjectName(res, "sampler state used to emulate the GX pipeline");
m_sampler.emplace(state.packed, res);
return res;
@ -414,7 +414,7 @@ ID3D11BlendState* StateCache::Get(BlendState state)
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");
D3D::SetDebugObjectName(res, "blend state used to emulate the GX pipeline");
m_blend.emplace(state.packed, res);
return res;
@ -436,8 +436,7 @@ ID3D11RasterizerState* StateCache::Get(RasterizerState state)
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");
D3D::SetDebugObjectName(res, "rasterizer state used to emulate the GX pipeline");
m_raster.emplace(state.packed, res);
return res;
@ -482,8 +481,7 @@ ID3D11DepthStencilState* StateCache::Get(ZMode state)
HRESULT hr = D3D::device->CreateDepthStencilState(&depthdc, &res);
if (SUCCEEDED(hr))
D3D::SetDebugObjectName((ID3D11DeviceChild*)res,
"depth-stencil state used to emulate the GX pipeline");
D3D::SetDebugObjectName(res, "depth-stencil state used to emulate the GX pipeline");
else
PanicAlert("Failed to create depth state at %s %d\n", __FILE__, __LINE__);