mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
VideoCommon: Eliminate static state in Renderer
This commit is contained in:
@ -86,8 +86,8 @@ D3DTexture2D*& FramebufferManager::GetResolvedEFBDepthTexture()
|
||||
|
||||
FramebufferManager::FramebufferManager()
|
||||
{
|
||||
m_target_width = std::max(Renderer::GetTargetWidth(), 1);
|
||||
m_target_height = std::max(Renderer::GetTargetHeight(), 1);
|
||||
m_target_width = std::max(g_renderer->GetTargetWidth(), 1);
|
||||
m_target_height = std::max(g_renderer->GetTargetHeight(), 1);
|
||||
|
||||
DXGI_SAMPLE_DESC sample_desc;
|
||||
sample_desc.Count = g_ActiveConfig.iMultisamples;
|
||||
@ -525,7 +525,7 @@ void XFBSource::CopyEFB(float gamma)
|
||||
D3D::SetPointCopySampler();
|
||||
|
||||
D3D::DrawShadedTexQuad(FramebufferManager::GetEFBColorTexture(), &rect,
|
||||
Renderer::GetTargetWidth(), Renderer::GetTargetHeight(),
|
||||
g_renderer->GetTargetWidth(), g_renderer->GetTargetHeight(),
|
||||
StaticShaderCache::GetColorCopyPixelShader(true),
|
||||
StaticShaderCache::GetSimpleVertexShader(),
|
||||
StaticShaderCache::GetSimpleVertexShaderInputLayout(),
|
||||
|
@ -166,7 +166,7 @@ void PSTextureEncoder::Encode(u8* dst, u32 format, u32 native_width, u32 bytes_p
|
||||
D3D::SetPointCopySampler();
|
||||
|
||||
D3D::DrawShadedTexQuad(
|
||||
efb_source, target_rect.AsRECT(), Renderer::GetTargetWidth(), Renderer::GetTargetHeight(),
|
||||
efb_source, target_rect.AsRECT(), g_renderer->GetTargetWidth(), g_renderer->GetTargetHeight(),
|
||||
SetStaticShader(format, is_depth_copy, is_intensity, scale_by_half),
|
||||
StaticShaderCache::GetSimpleVertexShader(),
|
||||
StaticShaderCache::GetSimpleVertexShaderInputLayout(), D3D12_SHADER_BYTECODE(), 1.0f, 0,
|
||||
|
@ -308,7 +308,7 @@ TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc)
|
||||
|
||||
// With D3D, we have to resize the backbuffer if the window changed
|
||||
// size.
|
||||
__declspec(noinline) bool Renderer::CheckForResize()
|
||||
bool Renderer::CheckForResize()
|
||||
{
|
||||
RECT rc_window;
|
||||
GetClientRect(D3D::hWnd, &rc_window);
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
|
||||
void ReinterpretPixelData(unsigned int conv_type) override;
|
||||
|
||||
static bool CheckForResize();
|
||||
bool CheckForResize();
|
||||
|
||||
u32 GetMaxTextureSize() override;
|
||||
|
||||
|
@ -288,7 +288,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(bool is_depth_copy, const EFBRe
|
||||
|
||||
// Create texture copy
|
||||
D3D::DrawShadedTexQuad(
|
||||
efb_tex, &sourcerect, Renderer::GetTargetWidth(), Renderer::GetTargetHeight(),
|
||||
efb_tex, &sourcerect, g_renderer->GetTargetWidth(), g_renderer->GetTargetHeight(),
|
||||
is_depth_copy ? StaticShaderCache::GetDepthMatrixPixelShader(multisampled) :
|
||||
StaticShaderCache::GetColorMatrixPixelShader(multisampled),
|
||||
StaticShaderCache::GetSimpleVertexShader(),
|
||||
|
Reference in New Issue
Block a user