D3D: Remove unnecessary renderer global references

This commit is contained in:
Lioncash 2016-08-31 14:17:22 -04:00
parent 9e26ef4aa8
commit 168e145fae
1 changed files with 7 additions and 8 deletions

View File

@ -628,8 +628,7 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
void Renderer::ReinterpretPixelData(unsigned int convtype)
{
// TODO: MSAA support..
D3D11_RECT source =
CD3D11_RECT(0, 0, g_renderer->GetTargetWidth(), g_renderer->GetTargetHeight());
D3D11_RECT source = CD3D11_RECT(0, 0, GetTargetWidth(), GetTargetHeight());
ID3D11PixelShader* pixel_shader;
if (convtype == 0)
@ -644,21 +643,21 @@ void Renderer::ReinterpretPixelData(unsigned int convtype)
}
// convert data and set the target texture as our new EFB
g_renderer->ResetAPIState();
ResetAPIState();
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, (float)g_renderer->GetTargetWidth(),
(float)g_renderer->GetTargetHeight());
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, static_cast<float>(GetTargetWidth()),
static_cast<float>(GetTargetHeight()));
D3D::context->RSSetViewports(1, &vp);
D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTempTexture()->GetRTV(),
nullptr);
D3D::SetPointCopySampler();
D3D::drawShadedTexQuad(
FramebufferManager::GetEFBColorTexture()->GetSRV(), &source, g_renderer->GetTargetWidth(),
g_renderer->GetTargetHeight(), pixel_shader, VertexShaderCache::GetSimpleVertexShader(),
FramebufferManager::GetEFBColorTexture()->GetSRV(), &source, GetTargetWidth(),
GetTargetHeight(), pixel_shader, VertexShaderCache::GetSimpleVertexShader(),
VertexShaderCache::GetSimpleInputLayout(), GeometryShaderCache::GetCopyGeometryShader());
g_renderer->RestoreAPIState();
RestoreAPIState();
FramebufferManager::SwapReinterpretTexture();
D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTexture()->GetRTV(),