Move xfb tracking and IR scaling out of RenderBase

This commit is contained in:
Scott Mansell
2023-01-31 17:26:46 +13:00
parent e009002411
commit 11de923dcb
20 changed files with 238 additions and 248 deletions

View File

@ -7,7 +7,7 @@
#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
@ -74,7 +74,7 @@ void PixelShaderManager::Dirty()
// Any constants that can changed based on settings should be re-calculated
m_fog_range_adjusted_changed = true;
SetEfbScaleChanged(g_renderer->EFBToScaledXf(1), g_renderer->EFBToScaledYf(1));
SetEfbScaleChanged(g_framebuffer_manager->EFBToScaledXf(1), g_framebuffer_manager->EFBToScaledYf(1));
SetFogParamChanged();
dirty = true;
@ -103,7 +103,7 @@ void PixelShaderManager::SetConstants()
// TODO: Shouldn't this be EFBToScaledXf?
constants.fogf[2] = ScreenSpaceCenter;
constants.fogf[3] =
static_cast<float>(g_renderer->EFBToScaledX(static_cast<int>(2.0f * xfmem.viewport.wd)));
static_cast<float>(g_framebuffer_manager->EFBToScaledX(static_cast<int>(2.0f * xfmem.viewport.wd)));
for (size_t i = 0, vec_index = 0; i < std::size(bpmem.fogRange.K); i++)
{