mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
VideoCommon: move xf state management to its own class, so changes can be detected in places other than VertexShaderManager
This commit is contained in:
parent
1a2d0882d0
commit
849a0c13b5
16 changed files with 470 additions and 299 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "VideoCommon/VertexShaderManager.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
#include "VideoCommon/XFMemory.h"
|
||||
#include "VideoCommon/XFStateManager.h"
|
||||
|
||||
// We really want things like c.w * a.x - a.w * c.x to stay symmetric, so they cancel to zero on
|
||||
// degenerate triangles. Make sure the compiler doesn't optimize in fmas where not requested.
|
||||
|
@ -153,7 +154,8 @@ bool CPUCull::AreAllVerticesCulled(VertexLoaderBase* loader, OpcodeDecoder::Prim
|
|||
}
|
||||
|
||||
// transform functions need the projection matrix to tranform to clip space
|
||||
Core::System::GetInstance().GetVertexShaderManager().SetProjectionMatrix();
|
||||
auto& system = Core::System::GetInstance();
|
||||
system.GetVertexShaderManager().SetProjectionMatrix(system.GetXFStateManager());
|
||||
|
||||
static constexpr Common::EnumMap<CullMode, CullMode::All> cullmode_invert = {
|
||||
CullMode::None, CullMode::Front, CullMode::Back, CullMode::All};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue