VideoCommon: move xf state management to its own class, so changes can be detected in places other than VertexShaderManager

This commit is contained in:
iwubcode
2023-11-25 16:23:54 -06:00
parent 1a2d0882d0
commit 849a0c13b5
16 changed files with 470 additions and 299 deletions

View File

@ -42,6 +42,7 @@
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
#include "VideoCommon/XFStateManager.h"
std::unique_ptr<VertexManagerBase> g_vertex_manager;
@ -539,6 +540,7 @@ void VertexManagerBase::Flush()
auto& pixel_shader_manager = system.GetPixelShaderManager();
auto& geometry_shader_manager = system.GetGeometryShaderManager();
auto& vertex_shader_manager = system.GetVertexShaderManager();
auto& xf_state_manager = system.GetXFStateManager();
if (g_ActiveConfig.bGraphicMods)
{
@ -578,7 +580,7 @@ void VertexManagerBase::Flush()
}
}
}
vertex_shader_manager.SetConstants(texture_names);
vertex_shader_manager.SetConstants(texture_names, xf_state_manager);
if (!bpmem.genMode.zfreeze)
{
// Must be done after VertexShaderManager::SetConstants()