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