D3D: Remove unnecessary renderer global references
This commit is contained in:
parent
9e26ef4aa8
commit
168e145fae
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue