From 819b61937fea7b6beae6da2a06143c48b81e01bc Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 9 Jul 2023 01:40:05 +1000 Subject: [PATCH] GS: Slim down GSState.h includes --- pcsx2/GS/GS.cpp | 15 ++++++++------- pcsx2/GS/GSClut.cpp | 1 + pcsx2/GS/GSState.cpp | 14 ++++++++------ pcsx2/GS/GSState.h | 21 ++++++++++----------- pcsx2/GS/Renderers/Common/GSRenderer.cpp | 3 +++ pcsx2/GS/Renderers/HW/GSHwHack.cpp | 1 + pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 6 ++++-- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 1 + pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp | 1 + pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp | 2 ++ 10 files changed, 39 insertions(+), 26 deletions(-) diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index 4ceb3a3096..8975075198 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -19,15 +19,16 @@ #include "Counters.h" #include "ImGui/FullscreenUI.h" #include "ImGui/ImGuiManager.h" -#include "GS.h" -#include "GSCapture.h" -#include "GSExtra.h" -#include "GSGL.h" -#include "GSLzma.h" -#include "GSUtil.h" +#include "GS/GS.h" +#include "GS/GSCapture.h" +#include "GS/GSExtra.h" +#include "GS/GSGL.h" +#include "GS/GSLzma.h" +#include "GS/GSPerfMon.h" +#include "GS/GSUtil.h" +#include "GS/MultiISA.h" #include "Host.h" #include "Input/InputManager.h" -#include "MultiISA.h" #include "MTGS.h" #include "pcsx2/GS.h" #include "GS/Renderers/Null/GSRendererNull.h" diff --git a/pcsx2/GS/GSClut.cpp b/pcsx2/GS/GSClut.cpp index af714bc400..4b13b52e1a 100644 --- a/pcsx2/GS/GSClut.cpp +++ b/pcsx2/GS/GSClut.cpp @@ -18,6 +18,7 @@ #include "GS/GSExtra.h" #include "GS/GSLocalMemory.h" #include "GS/GSGL.h" +#include "GS/GSUtil.h" #include "GS/Renderers/Common/GSDevice.h" #include "GS/Renderers/Common/GSRenderer.h" #include "common/AlignedMalloc.h" diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 5cb2b1d009..afe544cafd 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -14,16 +14,18 @@ */ #include "PrecompiledHeader.h" -#include "GSState.h" -#include "GSGL.h" -#include "GSUtil.h" +#include "GS/GSState.h" +#include "GS/GSDump.h" +#include "GS/GSGL.h" +#include "GS/GSPerfMon.h" +#include "GS/GSUtil.h" #include "common/Path.h" #include "common/StringUtil.h" -#include // clamp -#include // FLT_MAX +#include +#include #include -#include // Dump Verticles +#include int GSState::s_n = 0; int GSState::s_last_transfer_draw_n = 0; diff --git a/pcsx2/GS/GSState.h b/pcsx2/GS/GSState.h index ead1307caa..1c2da480f6 100644 --- a/pcsx2/GS/GSState.h +++ b/pcsx2/GS/GSState.h @@ -15,19 +15,18 @@ #pragma once -#include "GS.h" -#include "GSLocalMemory.h" -#include "GSDrawingContext.h" -#include "GSDrawingEnvironment.h" -#include "Renderers/Common/GSVertex.h" -#include "Renderers/Common/GSVertexTrace.h" -#include "GSUtil.h" -#include "GSPerfMon.h" -#include "GSVector.h" -#include "Renderers/Common/GSDevice.h" +#include "GS/GS.h" +#include "GS/GSLocalMemory.h" +#include "GS/GSDrawingContext.h" +#include "GS/GSDrawingEnvironment.h" +#include "GS/Renderers/Common/GSVertex.h" +#include "GS/Renderers/Common/GSVertexTrace.h" +#include "GS/Renderers/Common/GSDevice.h" +#include "GS/GSVector.h" #include "GSCrc.h" #include "GSAlignedClass.h" -#include "GSDump.h" + +class GSDumpBase; class GSState : public GSAlignedClass<32> { diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index 72b0f5de58..825c601957 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -19,7 +19,10 @@ #include "ImGui/ImGuiManager.h" #include "GS/Renderers/Common/GSRenderer.h" #include "GS/GSCapture.h" +#include "GS/GSDump.h" #include "GS/GSGL.h" +#include "GS/GSPerfMon.h" +#include "GS/GSUtil.h" #include "GSDumpReplayer.h" #include "Host.h" #include "PerformanceMetrics.h" diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index b302561002..151c2733ff 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -17,6 +17,7 @@ #include "GS/Renderers/HW/GSRendererHW.h" #include "GS/Renderers/HW/GSHwHack.h" #include "GS/GSGL.h" +#include "GS/GSUtil.h" static bool s_nativeres; diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 05d0188714..aaa0473321 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -14,9 +14,11 @@ */ #include "PrecompiledHeader.h" -#include "GSRendererHW.h" -#include "GSTextureReplacements.h" +#include "GS/Renderers/HW/GSRendererHW.h" +#include "GS/Renderers/HW/GSTextureReplacements.h" #include "GS/GSGL.h" +#include "GS/GSPerfMon.h" +#include "GS/GSUtil.h" #include "Host.h" #include "common/Align.h" #include "common/StringUtil.h" diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index b1409ea26e..09cea024ba 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -20,6 +20,7 @@ #include "GS/GSState.h" #include "GS/GSGL.h" #include "GS/GSIntrin.h" +#include "GS/GSPerfMon.h" #include "GS/GSUtil.h" #include "GS/GSXXH.h" #include "common/Align.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index 93b1353740..1f046c259d 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -20,6 +20,7 @@ #include "GS/Renderers/OpenGL/GLState.h" #include "GS/GSState.h" #include "GS/GSGL.h" +#include "GS/GSPerfMon.h" #include "GS/GSUtil.h" #include "Host.h" diff --git a/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp b/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp index a8c798617c..560df5f9ad 100644 --- a/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp @@ -16,6 +16,8 @@ #include "PrecompiledHeader.h" #include "GS/Renderers/SW/GSTextureCacheSW.h" #include "GS/GSExtra.h" +#include "GS/GSPerfMon.h" +#include "GS/GSUtil.h" GSTextureCacheSW::GSTextureCacheSW() = default;