summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-01-17 16:54:31 -0500
committerLioncash <mathew1800@gmail.com>2016-01-17 20:11:45 -0500
commitd9fec92628231526b47e19cd09b68572eb06e44f (patch)
tree4b61789785582aff42317d0a6fcd5e474b5c8b68 /Source/Core
parent87464d432b8dbef6311ee827d592cdce84fe7b67 (diff)
VideoCommon: Header cleanup
Also remedies places where the video backends and core rely on things being indirectly included.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/BootManager.cpp4
-rw-r--r--Source/Core/Core/Movie.cpp4
-rw-r--r--Source/Core/Core/State.cpp2
-rw-r--r--Source/Core/VideoBackends/D3D/BoundingBox.cpp3
-rw-r--r--Source/Core/VideoBackends/D3D/D3DBase.cpp3
-rw-r--r--Source/Core/VideoBackends/D3D/D3DShader.cpp4
-rw-r--r--Source/Core/VideoBackends/D3D/PerfQuery.cpp3
-rw-r--r--Source/Core/VideoBackends/D3D/Render.cpp6
-rw-r--r--Source/Core/VideoBackends/D3D/XFBEncoder.cpp3
-rw-r--r--Source/Core/VideoBackends/OGL/PerfQuery.cpp2
-rw-r--r--Source/Core/VideoBackends/OGL/SamplerCache.cpp3
-rw-r--r--Source/Core/VideoBackends/Software/EfbCopy.cpp5
-rw-r--r--Source/Core/VideoBackends/Software/EfbInterface.cpp6
-rw-r--r--Source/Core/VideoBackends/Software/EfbInterface.h2
-rw-r--r--Source/Core/VideoBackends/Software/Rasterizer.cpp2
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.cpp3
-rw-r--r--Source/Core/VideoBackends/Software/SWVertexLoader.cpp2
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp8
-rw-r--r--Source/Core/VideoBackends/Software/Tev.cpp1
-rw-r--r--Source/Core/VideoBackends/Software/TextureEncoder.cpp4
-rw-r--r--Source/Core/VideoCommon/AVIDump.cpp3
-rw-r--r--Source/Core/VideoCommon/AsyncRequests.cpp4
-rw-r--r--Source/Core/VideoCommon/AsyncRequests.h1
-rw-r--r--Source/Core/VideoCommon/BPFunctions.cpp5
-rw-r--r--Source/Core/VideoCommon/BPFunctions.h3
-rw-r--r--Source/Core/VideoCommon/BPMemory.cpp1
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp6
-rw-r--r--Source/Core/VideoCommon/BPStructs.h2
-rw-r--r--Source/Core/VideoCommon/BoundingBox.cpp2
-rw-r--r--Source/Core/VideoCommon/BoundingBox.h7
-rw-r--r--Source/Core/VideoCommon/CPMemory.cpp1
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.cpp10
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.h1
-rw-r--r--Source/Core/VideoCommon/DataReader.h1
-rw-r--r--Source/Core/VideoCommon/Debugger.cpp7
-rw-r--r--Source/Core/VideoCommon/FPSCounter.cpp2
-rw-r--r--Source/Core/VideoCommon/Fifo.cpp9
-rw-r--r--Source/Core/VideoCommon/Fifo.h3
-rw-r--r--Source/Core/VideoCommon/FramebufferManagerBase.h1
-rw-r--r--Source/Core/VideoCommon/GeometryShaderGen.cpp2
-rw-r--r--Source/Core/VideoCommon/GeometryShaderManager.cpp7
-rw-r--r--Source/Core/VideoCommon/GeometryShaderManager.h2
-rw-r--r--Source/Core/VideoCommon/HiresTextures.cpp6
-rw-r--r--Source/Core/VideoCommon/ImageWrite.cpp3
-rw-r--r--Source/Core/VideoCommon/IndexGenerator.cpp1
-rw-r--r--Source/Core/VideoCommon/LightingShaderGen.h4
-rw-r--r--Source/Core/VideoCommon/MainBase.cpp8
-rw-r--r--Source/Core/VideoCommon/OpcodeDecoding.cpp7
-rw-r--r--Source/Core/VideoCommon/PixelEngine.cpp4
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp6
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.h2
-rw-r--r--Source/Core/VideoCommon/PixelShaderManager.cpp5
-rw-r--r--Source/Core/VideoCommon/PixelShaderManager.h8
-rw-r--r--Source/Core/VideoCommon/PostProcessing.cpp3
-rw-r--r--Source/Core/VideoCommon/PostProcessing.h3
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp4
-rw-r--r--Source/Core/VideoCommon/RenderBase.h7
-rw-r--r--Source/Core/VideoCommon/ShaderGenCommon.h7
-rw-r--r--Source/Core/VideoCommon/Statistics.cpp1
-rw-r--r--Source/Core/VideoCommon/Statistics.h4
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp8
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.h3
-rw-r--r--Source/Core/VideoCommon/TextureConversionShader.cpp4
-rw-r--r--Source/Core/VideoCommon/TextureConversionShader.h1
-rw-r--r--Source/Core/VideoCommon/TextureDecoder.h3
-rw-r--r--Source/Core/VideoCommon/TextureDecoder_Common.cpp1
-rw-r--r--Source/Core/VideoCommon/TextureDecoder_Generic.cpp3
-rw-r--r--Source/Core/VideoCommon/TextureDecoder_x64.cpp5
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp8
-rw-r--r--Source/Core/VideoCommon/VertexLoader.h6
-rw-r--r--Source/Core/VideoCommon/VertexLoaderARM64.cpp2
-rw-r--r--Source/Core/VideoCommon/VertexLoaderARM64.h3
-rw-r--r--Source/Core/VideoCommon/VertexLoaderBase.cpp4
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp7
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.h3
-rw-r--r--Source/Core/VideoCommon/VertexLoaderUtils.h4
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp6
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.h1
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Color.cpp5
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Color.h2
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Normal.cpp5
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Normal.h2
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Position.cpp6
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Position.h2
-rw-r--r--Source/Core/VideoCommon/VertexLoader_TextCoord.cpp9
-rw-r--r--Source/Core/VideoCommon/VertexLoader_TextCoord.h2
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp6
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.h2
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp3
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.h1
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp4
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.h4
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.cpp3
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.h4
-rw-r--r--Source/Core/VideoCommon/VideoCommon.h1
-rw-r--r--Source/Core/VideoCommon/VideoState.cpp2
-rw-r--r--Source/Core/VideoCommon/XFMemory.cpp1
-rw-r--r--Source/Core/VideoCommon/XFStructs.cpp5
98 files changed, 202 insertions, 172 deletions
diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp
index 812bb174c9..d2e3819651 100644
--- a/Source/Core/Core/BootManager.cpp
+++ b/Source/Core/Core/BootManager.cpp
@@ -23,8 +23,8 @@
#include <string>
#include <vector>
-#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
+#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Common/SysConf.h"
#include "Core/BootManager.h"
@@ -37,8 +37,6 @@
#include "Core/HW/SI.h"
#include "Core/HW/Sram.h"
#include "Core/HW/WiimoteReal/WiimoteReal.h"
-#include "DiscIO/Volume.h"
-#include "DiscIO/VolumeCreator.h"
#include "VideoCommon/VideoBackendBase.h"
namespace BootManager
diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp
index 2351a84896..91ace55535 100644
--- a/Source/Core/Core/Movie.cpp
+++ b/Source/Core/Core/Movie.cpp
@@ -12,7 +12,6 @@
#include "Common/Hash.h"
#include "Common/NandPaths.h"
#include "Common/StringUtil.h"
-#include "Common/Thread.h"
#include "Common/Timer.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
@@ -29,13 +28,12 @@
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "Core/HW/WiimoteEmu/WiimoteHid.h"
-#include "Core/HW/WiimoteEmu/Attachment/Classic.h"
-#include "Core/HW/WiimoteEmu/Attachment/Nunchuk.h"
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h"
#include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h"
#include "Core/PowerPC/PowerPC.h"
#include "InputCommon/GCPadStatus.h"
#include "VideoCommon/Fifo.h"
+#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"
// The chunk to allocate movie data in multiples of.
diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp
index 99e712812f..33a7454083 100644
--- a/Source/Core/Core/State.cpp
+++ b/Source/Core/Core/State.cpp
@@ -10,8 +10,10 @@
#include <vector>
#include <lzo/lzo1x.h>
+#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
#include "Common/Event.h"
+#include "Common/FileUtil.h"
#include "Common/MsgHandler.h"
#include "Common/ScopeGuard.h"
#include "Common/StringUtil.h"
diff --git a/Source/Core/VideoBackends/D3D/BoundingBox.cpp b/Source/Core/VideoBackends/D3D/BoundingBox.cpp
index 564a84a276..52e08d8f40 100644
--- a/Source/Core/VideoBackends/D3D/BoundingBox.cpp
+++ b/Source/Core/VideoBackends/D3D/BoundingBox.cpp
@@ -2,8 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonTypes.h"
+#include "Common/MsgHandler.h"
#include "VideoBackends/D3D/BoundingBox.h"
-
#include "VideoCommon/VideoConfig.h"
namespace DX11
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp
index fa0a0adf06..5a4174ce99 100644
--- a/Source/Core/VideoBackends/D3D/D3DBase.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp
@@ -4,7 +4,10 @@
#include <algorithm>
+#include "Common/CommonTypes.h"
+#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
+#include "Common/Logging/Log.h"
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/D3DState.h"
#include "VideoBackends/D3D/D3DTexture.h"
diff --git a/Source/Core/VideoBackends/D3D/D3DShader.cpp b/Source/Core/VideoBackends/D3D/D3DShader.cpp
index 665c0cf644..106f54d4c4 100644
--- a/Source/Core/VideoBackends/D3D/D3DShader.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DShader.cpp
@@ -2,9 +2,13 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <fstream>
#include <string>
+#include "Common/FileUtil.h"
+#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
+#include "Common/Logging/Log.h"
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/D3DShader.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoBackends/D3D/PerfQuery.cpp b/Source/Core/VideoBackends/D3D/PerfQuery.cpp
index 62bc197be7..825e1696b0 100644
--- a/Source/Core/VideoBackends/D3D/PerfQuery.cpp
+++ b/Source/Core/VideoBackends/D3D/PerfQuery.cpp
@@ -2,6 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/PerfQuery.h"
#include "VideoCommon/RenderBase.h"
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index 4b3c97f04e..412e30763c 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -9,8 +9,9 @@
#include <strsafe.h>
#include <unordered_map>
+#include "Common/CommonTypes.h"
+#include "Common/FileUtil.h"
#include "Common/MathUtil.h"
-#include "Common/Timer.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
@@ -31,13 +32,10 @@
#include "VideoCommon/AVIDump.h"
#include "VideoCommon/BPFunctions.h"
#include "VideoCommon/Fifo.h"
-#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h"
-#include "VideoCommon/Statistics.h"
-#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
namespace DX11
diff --git a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
index a4fb947d5e..e1e93a6966 100644
--- a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
+++ b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp
@@ -2,6 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonTypes.h"
+#include "Common/MsgHandler.h"
+#include "Common/Logging/Log.h"
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/D3DBlob.h"
#include "VideoBackends/D3D/D3DShader.h"
diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.cpp b/Source/Core/VideoBackends/OGL/PerfQuery.cpp
index 770a082782..9fac58aa5f 100644
--- a/Source/Core/VideoBackends/OGL/PerfQuery.cpp
+++ b/Source/Core/VideoBackends/OGL/PerfQuery.cpp
@@ -4,6 +4,8 @@
#include <memory>
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
#include "Common/GL/GLInterfaceBase.h"
#include "Common/GL/GLUtil.h"
diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.cpp b/Source/Core/VideoBackends/OGL/SamplerCache.cpp
index 3c811a0109..0eeae5ee38 100644
--- a/Source/Core/VideoBackends/OGL/SamplerCache.cpp
+++ b/Source/Core/VideoBackends/OGL/SamplerCache.cpp
@@ -4,9 +4,10 @@
#include <memory>
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
#include "Common/GL/GLInterfaceBase.h"
#include "VideoBackends/OGL/SamplerCache.h"
-#include "VideoCommon/DriverDetails.h"
#include "VideoCommon/VideoConfig.h"
namespace OGL
diff --git a/Source/Core/VideoBackends/Software/EfbCopy.cpp b/Source/Core/VideoBackends/Software/EfbCopy.cpp
index 1111960c6f..b22a70e5cb 100644
--- a/Source/Core/VideoBackends/Software/EfbCopy.cpp
+++ b/Source/Core/VideoBackends/Software/EfbCopy.cpp
@@ -2,13 +2,12 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonTypes.h"
#include "Common/GL/GLInterfaceBase.h"
-#include "Core/Core.h"
+#include "Common/Logging/Log.h"
#include "Core/HW/Memmap.h"
-#include "VideoBackends/Software/DebugUtil.h"
#include "VideoBackends/Software/EfbCopy.h"
#include "VideoBackends/Software/EfbInterface.h"
-#include "VideoBackends/Software/SWRenderer.h"
#include "VideoBackends/Software/TextureEncoder.h"
#include "VideoCommon/BPMemory.h"
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp
index b6b55b7204..943ce78b06 100644
--- a/Source/Core/VideoBackends/Software/EfbInterface.cpp
+++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp
@@ -6,13 +6,11 @@
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
-#include "Core/HW/Memmap.h"
-
+#include "Common/Logging/Log.h"
#include "VideoBackends/Software/EfbInterface.h"
-
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/LookUpTables.h"
-#include "VideoCommon/PixelEngine.h"
+#include "VideoCommon/PerfQueryBase.h"
static u8 efb[EFB_WIDTH*EFB_HEIGHT*6];
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.h b/Source/Core/VideoBackends/Software/EfbInterface.h
index 0f09000a33..9355d4678b 100644
--- a/Source/Core/VideoBackends/Software/EfbInterface.h
+++ b/Source/Core/VideoBackends/Software/EfbInterface.h
@@ -4,6 +4,8 @@
#pragma once
+#include "Common/CommonTypes.h"
+#include "VideoCommon/PerfQueryBase.h"
#include "VideoCommon/VideoCommon.h"
namespace EfbInterface
diff --git a/Source/Core/VideoBackends/Software/Rasterizer.cpp b/Source/Core/VideoBackends/Software/Rasterizer.cpp
index 03d352beb5..e2f97ad347 100644
--- a/Source/Core/VideoBackends/Software/Rasterizer.cpp
+++ b/Source/Core/VideoBackends/Software/Rasterizer.cpp
@@ -10,7 +10,7 @@
#include "VideoBackends/Software/NativeVertexFormat.h"
#include "VideoBackends/Software/Rasterizer.h"
#include "VideoBackends/Software/Tev.h"
-#include "VideoCommon/BoundingBox.h"
+#include "VideoCommon/PerfQueryBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp
index 0aa5bdb50a..0f03f3e840 100644
--- a/Source/Core/VideoBackends/Software/SWRenderer.cpp
+++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp
@@ -8,10 +8,11 @@
#include <string>
#include "Common/CommonTypes.h"
+#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
-#include "Core/Core.h"
#include "Core/HW/Memmap.h"
#include "VideoBackends/Software/EfbCopy.h"
diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
index 86855db446..506a7b1da3 100644
--- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
+++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
@@ -22,7 +22,7 @@
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexLoaderBase.h"
#include "VideoCommon/VertexLoaderManager.h"
-#include "VideoCommon/VertexLoaderUtils.h"
+#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
class NullNativeVertexFormat : public NativeVertexFormat
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index 8600297e9c..16d80df52f 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -8,14 +8,9 @@
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
-#include "Common/StringUtil.h"
#include "Common/Logging/LogManager.h"
-#include "Core/ConfigManager.h"
-#include "Core/Core.h"
#include "Core/Host.h"
-#include "Core/HW/Memmap.h"
-#include "Core/HW/VideoInterface.h"
#include "VideoBackends/Software/Clipper.h"
#include "VideoBackends/Software/DebugUtil.h"
@@ -30,7 +25,7 @@
#include "VideoCommon/BPStructs.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
-#include "VideoCommon/Fifo.h"
+#include "VideoCommon/FramebufferManagerBase.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/OpcodeDecoding.h"
@@ -40,7 +35,6 @@
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
-#include "VideoCommon/XFMemory.h"
#define VSYNC_ENABLED 0
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp
index 939b9f98a4..9f7fb4bce6 100644
--- a/Source/Core/VideoBackends/Software/Tev.cpp
+++ b/Source/Core/VideoBackends/Software/Tev.cpp
@@ -12,6 +12,7 @@
#include "VideoBackends/Software/TextureSampler.h"
#include "VideoCommon/BoundingBox.h"
+#include "VideoCommon/PerfQueryBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
diff --git a/Source/Core/VideoBackends/Software/TextureEncoder.cpp b/Source/Core/VideoBackends/Software/TextureEncoder.cpp
index 4b38d1c19a..5ac514ca11 100644
--- a/Source/Core/VideoBackends/Software/TextureEncoder.cpp
+++ b/Source/Core/VideoBackends/Software/TextureEncoder.cpp
@@ -2,6 +2,10 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
+#include "Common/MsgHandler.h"
+
#include "VideoBackends/Software/EfbInterface.h"
#include "VideoBackends/Software/TextureEncoder.h"
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp
index f767d961a7..28adcc3476 100644
--- a/Source/Core/VideoCommon/AVIDump.cpp
+++ b/Source/Core/VideoCommon/AVIDump.cpp
@@ -15,9 +15,8 @@ extern "C" {
#include <libswscale/swscale.h>
}
-#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
-#include "Common/StringUtil.h"
+#include "Common/MsgHandler.h"
#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp
index bddf8e7445..13cbf70937 100644
--- a/Source/Core/VideoCommon/AsyncRequests.cpp
+++ b/Source/Core/VideoCommon/AsyncRequests.cpp
@@ -2,9 +2,13 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <mutex>
+
#include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/RenderBase.h"
+#include "VideoCommon/VideoBackendBase.h"
+#include "VideoCommon/VideoCommon.h"
AsyncRequests AsyncRequests::s_singleton;
diff --git a/Source/Core/VideoCommon/AsyncRequests.h b/Source/Core/VideoCommon/AsyncRequests.h
index 39e79ab8e3..6625618dd1 100644
--- a/Source/Core/VideoCommon/AsyncRequests.h
+++ b/Source/Core/VideoCommon/AsyncRequests.h
@@ -8,6 +8,7 @@
#include <condition_variable>
#include <mutex>
#include <queue>
+#include <vector>
#include "Common/CommonTypes.h"
diff --git a/Source/Core/VideoCommon/BPFunctions.cpp b/Source/Core/VideoCommon/BPFunctions.cpp
index 61aa91e63e..63b99495e2 100644
--- a/Source/Core/VideoCommon/BPFunctions.cpp
+++ b/Source/Core/VideoCommon/BPFunctions.cpp
@@ -3,14 +3,15 @@
// Refer to the license.txt file included.
#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
-#include "Core/HW/Memmap.h"
#include "VideoCommon/BPFunctions.h"
+#include "VideoCommon/BPMemory.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VertexManagerBase.h"
-#include "VideoCommon/VertexShaderManager.h"
+#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
namespace BPFunctions
diff --git a/Source/Core/VideoCommon/BPFunctions.h b/Source/Core/VideoCommon/BPFunctions.h
index 126d9f1d7b..4d78e9bc87 100644
--- a/Source/Core/VideoCommon/BPFunctions.h
+++ b/Source/Core/VideoCommon/BPFunctions.h
@@ -9,9 +9,10 @@
#pragma once
-#include "VideoCommon/BPMemory.h"
#include "VideoCommon/VideoCommon.h"
+struct BPCmd;
+
namespace BPFunctions
{
diff --git a/Source/Core/VideoCommon/BPMemory.cpp b/Source/Core/VideoCommon/BPMemory.cpp
index f1371545b8..1665976018 100644
--- a/Source/Core/VideoCommon/BPMemory.cpp
+++ b/Source/Core/VideoCommon/BPMemory.cpp
@@ -2,7 +2,6 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include "Common/CommonTypes.h"
#include "VideoCommon/BPMemory.h"
// BP state
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index 35f017f5c5..4962dc59ed 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -3,16 +3,19 @@
// Refer to the license.txt file included.
#include <cmath>
+#include <cstring>
+#include <string>
#include "Common/StringUtil.h"
#include "Common/Thread.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
-#include "Core/Core.h"
#include "Core/FifoPlayer/FifoRecorder.h"
#include "Core/HW/Memmap.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/BPFunctions.h"
+#include "VideoCommon/BPMemory.h"
#include "VideoCommon/BPStructs.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/GeometryShaderManager.h"
@@ -20,7 +23,6 @@
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/RenderBase.h"
-#include "VideoCommon/Statistics.h"
#include "VideoCommon/TextureCacheBase.h"
#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/VertexShaderManager.h"
diff --git a/Source/Core/VideoCommon/BPStructs.h b/Source/Core/VideoCommon/BPStructs.h
index 6721cbefe9..e6c7d9de2b 100644
--- a/Source/Core/VideoCommon/BPStructs.h
+++ b/Source/Core/VideoCommon/BPStructs.h
@@ -4,7 +4,5 @@
#pragma once
-#include "VideoCommon/BPMemory.h"
-
void BPInit();
void BPReload();
diff --git a/Source/Core/VideoCommon/BoundingBox.cpp b/Source/Core/VideoCommon/BoundingBox.cpp
index 9336a6a671..016d80edc7 100644
--- a/Source/Core/VideoCommon/BoundingBox.cpp
+++ b/Source/Core/VideoCommon/BoundingBox.cpp
@@ -14,7 +14,7 @@ bool active = false;
u16 coords[4] = { 0x80, 0xA0, 0x80, 0xA0 };
// Save state
-void DoState(PointerWrap &p)
+void DoState(PointerWrap& p)
{
p.Do(active);
p.Do(coords);
diff --git a/Source/Core/VideoCommon/BoundingBox.h b/Source/Core/VideoCommon/BoundingBox.h
index af649b8971..6a4e5e14b6 100644
--- a/Source/Core/VideoCommon/BoundingBox.h
+++ b/Source/Core/VideoCommon/BoundingBox.h
@@ -4,10 +4,11 @@
#pragma once
-#include "VideoCommon/VertexLoader.h"
+#include "Common/CommonTypes.h"
-// Bounding Box manager
+class PointerWrap;
+// Bounding Box manager
namespace BoundingBox
{
@@ -26,6 +27,6 @@ enum
};
// Save state
-void DoState(PointerWrap &p);
+void DoState(PointerWrap& p);
}; // end of namespace BoundingBox
diff --git a/Source/Core/VideoCommon/CPMemory.cpp b/Source/Core/VideoCommon/CPMemory.cpp
index bfdf4416fa..f737e360b9 100644
--- a/Source/Core/VideoCommon/CPMemory.cpp
+++ b/Source/Core/VideoCommon/CPMemory.cpp
@@ -3,7 +3,6 @@
// Refer to the license.txt file included.
#include "Common/ChunkFile.h"
-#include "Common/CommonTypes.h"
#include "VideoCommon/CPMemory.h"
// CP state
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp
index 1d5e1ab172..747bec83fe 100644
--- a/Source/Core/VideoCommon/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/CommandProcessor.cpp
@@ -3,24 +3,20 @@
// Refer to the license.txt file included.
#include <atomic>
+#include <cstring>
+#include "Common/Assert.h"
#include "Common/Atomic.h"
#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
-#include "Common/MathUtil.h"
-#include "Common/Thread.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
-#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/HW/GPFifo.h"
-#include "Core/HW/Memmap.h"
#include "Core/HW/MMIO.h"
#include "Core/HW/ProcessorInterface.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
-#include "VideoCommon/PixelEngine.h"
-#include "VideoCommon/VideoCommon.h"
-#include "VideoCommon/VideoConfig.h"
namespace CommandProcessor
{
diff --git a/Source/Core/VideoCommon/CommandProcessor.h b/Source/Core/VideoCommon/CommandProcessor.h
index 2618a19801..e840c40bb1 100644
--- a/Source/Core/VideoCommon/CommandProcessor.h
+++ b/Source/Core/VideoCommon/CommandProcessor.h
@@ -5,7 +5,6 @@
#pragma once
#include "Common/CommonTypes.h"
-#include "Common/Flag.h"
#include "VideoCommon/VideoBackendBase.h"
class PointerWrap;
diff --git a/Source/Core/VideoCommon/DataReader.h b/Source/Core/VideoCommon/DataReader.h
index bb4914db8c..92f55b3c8d 100644
--- a/Source/Core/VideoCommon/DataReader.h
+++ b/Source/Core/VideoCommon/DataReader.h
@@ -5,6 +5,7 @@
#pragma once
#include <cstring>
+#include "Common/Common.h"
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
diff --git a/Source/Core/VideoCommon/Debugger.cpp b/Source/Core/VideoCommon/Debugger.cpp
index 24ec679400..039b38ba6e 100644
--- a/Source/Core/VideoCommon/Debugger.cpp
+++ b/Source/Core/VideoCommon/Debugger.cpp
@@ -5,14 +5,11 @@
#include <string>
#include "Common/FileUtil.h"
-#include "Common/IniFile.h"
+#include "Common/StringUtil.h"
#include "Common/Thread.h"
+#include "VideoCommon/BPMemory.h"
#include "VideoCommon/Debugger.h"
-#include "VideoCommon/NativeVertexFormat.h"
-#include "VideoCommon/PixelShaderGen.h"
-#include "VideoCommon/TextureCacheBase.h"
-#include "VideoCommon/VertexShaderGen.h"
#include "VideoCommon/VideoConfig.h"
GFXDebuggerBase *g_pdebugger = nullptr;
diff --git a/Source/Core/VideoCommon/FPSCounter.cpp b/Source/Core/VideoCommon/FPSCounter.cpp
index 64436df5f6..15fb28081c 100644
--- a/Source/Core/VideoCommon/FPSCounter.cpp
+++ b/Source/Core/VideoCommon/FPSCounter.cpp
@@ -4,8 +4,8 @@
#include <fstream>
+#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
-#include "Common/StringUtil.h"
#include "Common/Timer.h"
#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp
index 97c8902bd8..acc43b8855 100644
--- a/Source/Core/VideoCommon/Fifo.cpp
+++ b/Source/Core/VideoCommon/Fifo.cpp
@@ -3,19 +3,18 @@
// Refer to the license.txt file included.
#include <atomic>
+#include <cstring>
+#include "Common/Assert.h"
#include "Common/Atomic.h"
#include "Common/BlockingLoop.h"
#include "Common/ChunkFile.h"
-#include "Common/CPUDetect.h"
#include "Common/Event.h"
#include "Common/FPURoundMode.h"
#include "Common/MemoryUtil.h"
-#include "Common/Thread.h"
+#include "Common/MsgHandler.h"
#include "Core/ConfigManager.h"
-#include "Core/Core.h"
-#include "Core/CoreTiming.h"
#include "Core/NetPlayProto.h"
#include "Core/HW/Memmap.h"
@@ -25,10 +24,8 @@
#include "VideoCommon/DataReader.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/OpcodeDecoding.h"
-#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexManagerBase.h"
-#include "VideoCommon/VideoConfig.h"
namespace Fifo
{
diff --git a/Source/Core/VideoCommon/Fifo.h b/Source/Core/VideoCommon/Fifo.h
index c137869414..d342b535df 100644
--- a/Source/Core/VideoCommon/Fifo.h
+++ b/Source/Core/VideoCommon/Fifo.h
@@ -4,8 +4,9 @@
#pragma once
+#include <atomic>
+#include <cstddef>
#include "Common/CommonTypes.h"
-#include "VideoCommon/VideoBackendBase.h"
class PointerWrap;
diff --git a/Source/Core/VideoCommon/FramebufferManagerBase.h b/Source/Core/VideoCommon/FramebufferManagerBase.h
index ab4ef577d9..d8eda55b8e 100644
--- a/Source/Core/VideoCommon/FramebufferManagerBase.h
+++ b/Source/Core/VideoCommon/FramebufferManagerBase.h
@@ -8,6 +8,7 @@
#include <list>
#include <memory>
+#include "Common/CommonTypes.h"
#include "VideoCommon/VideoCommon.h"
inline bool AddressRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper)
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp
index 602adb7e21..057e697ed8 100644
--- a/Source/Core/VideoCommon/GeometryShaderGen.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp
@@ -3,7 +3,9 @@
// Refer to the license.txt file included.
#include <cmath>
+#include <cstring>
+#include "Common/CommonTypes.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/GeometryShaderGen.h"
#include "VideoCommon/LightingShaderGen.h"
diff --git a/Source/Core/VideoCommon/GeometryShaderManager.cpp b/Source/Core/VideoCommon/GeometryShaderManager.cpp
index c5eb4fb256..b75a407817 100644
--- a/Source/Core/VideoCommon/GeometryShaderManager.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderManager.cpp
@@ -2,13 +2,12 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include <cfloat>
-#include <cmath>
+#include <cstring>
+#include "Common/ChunkFile.h"
+#include "Common/CommonTypes.h"
#include "VideoCommon/BPMemory.h"
-#include "VideoCommon/GeometryShaderGen.h"
#include "VideoCommon/GeometryShaderManager.h"
-#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
diff --git a/Source/Core/VideoCommon/GeometryShaderManager.h b/Source/Core/VideoCommon/GeometryShaderManager.h
index 56773a22fc..4f80562391 100644
--- a/Source/Core/VideoCommon/GeometryShaderManager.h
+++ b/Source/Core/VideoCommon/GeometryShaderManager.h
@@ -4,8 +4,8 @@
#pragma once
+#include "Common/CommonTypes.h"
#include "VideoCommon/ConstantManager.h"
-#include "VideoCommon/GeometryShaderGen.h"
class PointerWrap;
diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp
index 151d21822d..b03b489305 100644
--- a/Source/Core/VideoCommon/HiresTextures.cpp
+++ b/Source/Core/VideoCommon/HiresTextures.cpp
@@ -5,15 +5,16 @@
#include <algorithm>
#include <cinttypes>
#include <cstring>
+#include <memory>
#include <mutex>
#include <string>
#include <thread>
#include <unordered_map>
#include <utility>
+#include <vector>
#include <xxhash.h>
#include <SOIL/SOIL.h>
-#include "Common/CommonPaths.h"
#include "Common/FileSearch.h"
#include "Common/FileUtil.h"
#include "Common/Flag.h"
@@ -22,9 +23,8 @@
#include "Common/StringUtil.h"
#include "Common/Thread.h"
#include "Common/Timer.h"
-
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
-
#include "VideoCommon/HiresTextures.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoCommon/ImageWrite.cpp b/Source/Core/VideoCommon/ImageWrite.cpp
index e8c55088c1..26cade5a21 100644
--- a/Source/Core/VideoCommon/ImageWrite.cpp
+++ b/Source/Core/VideoCommon/ImageWrite.cpp
@@ -4,12 +4,11 @@
#include <list>
#include <string>
-#include <vector>
#include "png.h"
+#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/MsgHandler.h"
-#include "Common/Logging/Log.h"
#include "VideoCommon/ImageWrite.h"
bool SaveData(const std::string& filename, const std::string& data)
diff --git a/Source/Core/VideoCommon/IndexGenerator.cpp b/Source/Core/VideoCommon/IndexGenerator.cpp
index c1941c09b8..2f25c97640 100644
--- a/Source/Core/VideoCommon/IndexGenerator.cpp
+++ b/Source/Core/VideoCommon/IndexGenerator.cpp
@@ -6,6 +6,7 @@
#include "Common/Common.h"
#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/OpcodeDecoding.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoCommon/LightingShaderGen.h b/Source/Core/VideoCommon/LightingShaderGen.h
index ae388ac5ed..9fe3510052 100644
--- a/Source/Core/VideoCommon/LightingShaderGen.h
+++ b/Source/Core/VideoCommon/LightingShaderGen.h
@@ -4,8 +4,8 @@
#pragma once
-#include "VideoCommon/ConstantManager.h"
-#include "VideoCommon/DriverDetails.h"
+#include "Common/Assert.h"
+#include "Common/CommonTypes.h"
#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/ShaderGenCommon.h"
#include "VideoCommon/XFMemory.h"
diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp
index 173c8f7077..9280a31074 100644
--- a/Source/Core/VideoCommon/MainBase.cpp
+++ b/Source/Core/VideoCommon/MainBase.cpp
@@ -2,16 +2,16 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <cstring>
+
+#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
#include "Common/Event.h"
#include "Common/Flag.h"
-#include "Core/ConfigManager.h"
-
+#include "Common/Logging/Log.h"
#include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/BPStructs.h"
-#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
-#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/TextureCacheBase.h"
#include "VideoCommon/VertexLoaderManager.h"
diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp
index 5e7b57a54a..99a801a8f3 100644
--- a/Source/Core/VideoCommon/OpcodeDecoding.cpp
+++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp
@@ -13,9 +13,8 @@
// when they are called. The reason is that the vertex format affects the sizes of the vertices.
#include "Common/CommonTypes.h"
-#include "Common/CPUDetect.h"
-#include "Core/Core.h"
-#include "Core/Host.h"
+#include "Common/MsgHandler.h"
+#include "Common/Logging/Log.h"
#include "Core/FifoPlayer/FifoRecorder.h"
#include "Core/HW/Memmap.h"
#include "VideoCommon/BPMemory.h"
@@ -24,11 +23,9 @@
#include "VideoCommon/DataReader.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/OpcodeDecoding.h"
-#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VideoCommon.h"
-#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp
index af261eb90f..eec9a5730a 100644
--- a/Source/Core/VideoCommon/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/PixelEngine.cpp
@@ -10,18 +10,16 @@
#include "Common/Atomic.h"
#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
-#include "Core/State.h"
#include "Core/HW/MMIO.h"
#include "Core/HW/ProcessorInterface.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/PixelEngine.h"
-#include "VideoCommon/RenderBase.h"
-#include "VideoCommon/VideoCommon.h"
namespace PixelEngine
{
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 04c0df00c6..60c600a4af 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -2,11 +2,13 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include <cassert>
#include <cmath>
#include <cstdio>
+#include <cstring>
-#include "Common/Common.h"
+#include "Common/Assert.h"
+#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/DriverDetails.h"
diff --git a/Source/Core/VideoCommon/PixelShaderGen.h b/Source/Core/VideoCommon/PixelShaderGen.h
index 70f75958ca..3cc8071ce9 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.h
+++ b/Source/Core/VideoCommon/PixelShaderGen.h
@@ -4,7 +4,7 @@
#pragma once
-#include "VideoCommon/BPMemory.h"
+#include "Common/CommonTypes.h"
#include "VideoCommon/LightingShaderGen.h"
#include "VideoCommon/ShaderGenCommon.h"
#include "VideoCommon/VideoCommon.h"
diff --git a/Source/Core/VideoCommon/PixelShaderManager.cpp b/Source/Core/VideoCommon/PixelShaderManager.cpp
index e388c15fcf..3fd0cfe0c8 100644
--- a/Source/Core/VideoCommon/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/PixelShaderManager.cpp
@@ -3,14 +3,15 @@
// Refer to the license.txt file included.
#include <cmath>
+#include <cstring>
+#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
-
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/RenderBase.h"
-#include "VideoCommon/Statistics.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
+#include "VideoCommon/XFMemory.h"
bool PixelShaderManager::s_bFogRangeAdjustChanged;
bool PixelShaderManager::s_bViewPortChanged;
diff --git a/Source/Core/VideoCommon/PixelShaderManager.h b/Source/Core/VideoCommon/PixelShaderManager.h
index b3a7e8419b..5780c4533b 100644
--- a/Source/Core/VideoCommon/PixelShaderManager.h
+++ b/Source/Core/VideoCommon/PixelShaderManager.h
@@ -4,17 +4,11 @@
#pragma once
-#include <array>
-
-#include "VideoCommon/BPMemory.h"
+#include "Common/CommonTypes.h"
#include "VideoCommon/ConstantManager.h"
-#include "VideoCommon/PixelShaderGen.h"
-#include "VideoCommon/XFMemory.h"
class PointerWrap;
-
-
// The non-API dependent parts.
class PixelShaderManager
{
diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp
index 1ee7e142dd..1862bcde34 100644
--- a/Source/Core/VideoCommon/PostProcessing.cpp
+++ b/Source/Core/VideoCommon/PostProcessing.cpp
@@ -2,12 +2,15 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <sstream>
#include <string>
#include "Common/CommonPaths.h"
+#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Common/StringUtil.h"
+#include "Common/Logging/Log.h"
#include "VideoCommon/PostProcessing.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoCommon/PostProcessing.h b/Source/Core/VideoCommon/PostProcessing.h
index 52ebf1b71b..681980925b 100644
--- a/Source/Core/VideoCommon/PostProcessing.h
+++ b/Source/Core/VideoCommon/PostProcessing.h
@@ -8,9 +8,8 @@
#include <string>
#include <vector>
-#include "Common/StringUtil.h"
+#include "Common/CommonTypes.h"
#include "Common/Timer.h"
-
#include "VideoCommon/VideoCommon.h"
class PostProcessingShaderConfiguration
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index b569c378a3..212d03a939 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -15,9 +15,12 @@
#include <cinttypes>
#include <cmath>
#include <memory>
+#include <mutex>
#include <string>
+#include "Common/CommonTypes.h"
#include "Common/Event.h"
+#include "Common/Flag.h"
#include "Common/Profiler.h"
#include "Common/StringUtil.h"
#include "Common/Timer.h"
@@ -27,7 +30,6 @@
#include "Core/Host.h"
#include "Core/Movie.h"
#include "Core/FifoPlayer/FifoRecorder.h"
-
#include "Core/HW/VideoInterface.h"
#include "VideoCommon/AVIDump.h"
diff --git a/Source/Core/VideoCommon/RenderBase.h b/Source/Core/VideoCommon/RenderBase.h
index fb3668286a..331e353e74 100644
--- a/Source/Core/VideoCommon/RenderBase.h
+++ b/Source/Core/VideoCommon/RenderBase.h
@@ -17,14 +17,15 @@
#include <memory>
#include <mutex>
#include <string>
+#include <vector>
+#include "Common/CommonTypes.h"
#include "Common/Event.h"
+#include "Common/Flag.h"
#include "Common/MathUtil.h"
-#include "Common/Thread.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/FPSCounter.h"
-#include "VideoCommon/FramebufferManagerBase.h"
-#include "VideoCommon/NativeVertexFormat.h"
+#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoCommon.h"
class PostProcessingShaderImplementation;
diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h
index acda202d94..a6e7ce0b36 100644
--- a/Source/Core/VideoCommon/ShaderGenCommon.h
+++ b/Source/Core/VideoCommon/ShaderGenCommon.h
@@ -4,15 +4,18 @@
#pragma once
-#include <algorithm>
#include <cstdarg>
-#include <cstdio>
+#include <cstring>
+#include <fstream>
#include <iomanip>
+#include <map>
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
+#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
+#include "Common/Logging/Log.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp
index 53db2fcf50..2a80eb3a69 100644
--- a/Source/Core/VideoCommon/Statistics.cpp
+++ b/Source/Core/VideoCommon/Statistics.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <cstring>
#include <string>
#include <utility>
diff --git a/Source/Core/VideoCommon/Statistics.h b/Source/Core/VideoCommon/Statistics.h
index 26c663a513..df6b1a2a48 100644
--- a/Source/Core/VideoCommon/Statistics.h
+++ b/Source/Core/VideoCommon/Statistics.h
@@ -5,10 +5,6 @@
#pragma once
#include <string>
-#include <vector>
-
-#include "Common/CommonTypes.h"
-#include "VideoCommon/VideoCommon.h"
struct Statistics
{
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index f47dab338c..74676f4d5b 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -3,24 +3,32 @@
// Refer to the license.txt file included.
#include <algorithm>
+#include <cstring>
#include <memory>
#include <string>
+#include <utility>
+#include "Common/Assert.h"
+#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
+#include "Common/Hash.h"
#include "Common/MemoryUtil.h"
#include "Common/StringUtil.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
#include "Core/FifoPlayer/FifoPlayer.h"
#include "Core/FifoPlayer/FifoRecorder.h"
#include "Core/HW/Memmap.h"
+#include "VideoCommon/BPMemory.h"
#include "VideoCommon/Debugger.h"
#include "VideoCommon/FramebufferManagerBase.h"
#include "VideoCommon/HiresTextures.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/TextureCacheBase.h"
+#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h
index e1e64777ae..b22466e381 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.h
+++ b/Source/Core/VideoCommon/TextureCacheBase.h
@@ -4,14 +4,11 @@
#pragma once
-#include <functional>
#include <map>
#include <memory>
#include <unordered_map>
#include "Common/CommonTypes.h"
-#include "Common/Thread.h"
-
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/VideoCommon.h"
diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp
index c366eea588..7cb8e90135 100644
--- a/Source/Core/VideoCommon/TextureConversionShader.cpp
+++ b/Source/Core/VideoCommon/TextureConversionShader.cpp
@@ -5,12 +5,12 @@
#include <cmath>
#include <cstdio>
+#include "Common/CommonTypes.h"
#include "Common/MathUtil.h"
-#include "VideoCommon/BPMemory.h"
+#include "Common/MsgHandler.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/TextureConversionShader.h"
#include "VideoCommon/TextureDecoder.h"
-#include "VideoCommon/VideoConfig.h"
#define WRITE p+=sprintf
diff --git a/Source/Core/VideoCommon/TextureConversionShader.h b/Source/Core/VideoCommon/TextureConversionShader.h
index a45275256d..22b89114bd 100644
--- a/Source/Core/VideoCommon/TextureConversionShader.h
+++ b/Source/Core/VideoCommon/TextureConversionShader.h
@@ -5,7 +5,6 @@
#pragma once
#include "Common/CommonTypes.h"
-#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/VideoCommon.h"
namespace TextureConversionShader
diff --git a/Source/Core/VideoCommon/TextureDecoder.h b/Source/Core/VideoCommon/TextureDecoder.h
index 26d1163880..fe88838ec3 100644
--- a/Source/Core/VideoCommon/TextureDecoder.h
+++ b/Source/Core/VideoCommon/TextureDecoder.h
@@ -4,8 +4,7 @@
#pragma once
-#include "Common/Common.h"
-#include "Common/Hash.h"
+#include "Common/CommonTypes.h"
enum
{
diff --git a/Source/Core/VideoCommon/TextureDecoder_Common.cpp b/Source/Core/VideoCommon/TextureDecoder_Common.cpp
index a37abe6e7e..3cd8f208be 100644
--- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp
+++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp
@@ -8,7 +8,6 @@
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "Common/MsgHandler.h"
-#include "Common/Logging/Log.h"
#include "VideoCommon/LookUpTables.h"
#include "VideoCommon/sfont.inc"
#include "VideoCommon/TextureDecoder.h"
diff --git a/Source/Core/VideoCommon/TextureDecoder_Generic.cpp b/Source/Core/VideoCommon/TextureDecoder_Generic.cpp
index f69fefe6c5..d5d9280b87 100644
--- a/Source/Core/VideoCommon/TextureDecoder_Generic.cpp
+++ b/Source/Core/VideoCommon/TextureDecoder_Generic.cpp
@@ -5,7 +5,8 @@
#include <algorithm>
#include <cmath>
-#include "Common/Common.h"
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
#include "Common/CPUDetect.h"
#include "VideoCommon/LookUpTables.h"
#include "VideoCommon/TextureDecoder.h"
diff --git a/Source/Core/VideoCommon/TextureDecoder_x64.cpp b/Source/Core/VideoCommon/TextureDecoder_x64.cpp
index 405d4de592..7a4b0c9906 100644
--- a/Source/Core/VideoCommon/TextureDecoder_x64.cpp
+++ b/Source/Core/VideoCommon/TextureDecoder_x64.cpp
@@ -4,14 +4,15 @@
#include <algorithm>
#include <cmath>
+#include <cstring>
-#include "Common/Common.h"
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
#include "Common/CPUDetect.h"
#include "Common/Intrinsics.h"
#include "VideoCommon/LookUpTables.h"
#include "VideoCommon/TextureDecoder.h"
-#include "VideoCommon/VideoConfig.h"
// GameCube/Wii texture decoder
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index d186ad9cde..7846103f5a 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -2,22 +2,18 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include "Common/Common.h"
+#include "Common/Assert.h"
#include "Common/CommonTypes.h"
-#include "Common/MemoryUtil.h"
-
-#include "Core/Host.h"
#include "VideoCommon/DataReader.h"
-#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_Color.h"
#include "VideoCommon/VertexLoader_Normal.h"
#include "VideoCommon/VertexLoader_Position.h"
#include "VideoCommon/VertexLoader_TextCoord.h"
#include "VideoCommon/VertexLoaderManager.h"
+#include "VideoCommon/VertexLoaderUtils.h"
#include "VideoCommon/VideoCommon.h"
-#include "VideoCommon/VideoConfig.h"
// This pointer is used as the source/dst for all fixed function loader calls
u8* g_video_buffer_read_ptr;
diff --git a/Source/Core/VideoCommon/VertexLoader.h b/Source/Core/VideoCommon/VertexLoader.h
index c68614f0d8..af5d2db21a 100644
--- a/Source/Core/VideoCommon/VertexLoader.h
+++ b/Source/Core/VideoCommon/VertexLoader.h
@@ -7,17 +7,11 @@
// Top vertex loaders
// Metroid Prime: P I16-flt N I16-s16 T0 I16-u16 T1 i16-flt
-#include <algorithm>
#include <string>
#include "Common/CommonTypes.h"
-
-#include "VideoCommon/CPMemory.h"
#include "VideoCommon/DataReader.h"
-#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/VertexLoaderBase.h"
-#include "VideoCommon/VertexLoaderUtils.h"
-
class VertexLoader;
typedef void (*TPipelineFunction)(VertexLoader* loader);
diff --git a/Source/Core/VideoCommon/VertexLoaderARM64.cpp b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
index 4251acaaa0..e068a9abac 100644
--- a/Source/Core/VideoCommon/VertexLoaderARM64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonTypes.h"
+#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoaderARM64.h"
#include "VideoCommon/VertexLoaderManager.h"
diff --git a/Source/Core/VideoCommon/VertexLoaderARM64.h b/Source/Core/VideoCommon/VertexLoaderARM64.h
index cbcf7bf06d..3630f2cd8e 100644
--- a/Source/Core/VideoCommon/VertexLoaderARM64.h
+++ b/Source/Core/VideoCommon/VertexLoaderARM64.h
@@ -3,7 +3,10 @@
// Refer to the license.txt file included.
#pragma once
+
#include "Common/Arm64Emitter.h"
+#include "Common/CommonTypes.h"
+#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoaderBase.h"
class VertexLoaderARM64 : public VertexLoaderBase, public Arm64Gen::ARM64CodeBlock
diff --git a/Source/Core/VideoCommon/VertexLoaderBase.cpp b/Source/Core/VideoCommon/VertexLoaderBase.cpp
index 94d4f600ae..ef7a409eea 100644
--- a/Source/Core/VideoCommon/VertexLoaderBase.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderBase.cpp
@@ -3,10 +3,12 @@
// Refer to the license.txt file included.
#include <cinttypes>
+#include <cstring>
#include <memory>
+#include <string>
#include <vector>
-#include "Common/Common.h"
+#include "Common/CommonTypes.h"
#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
#include "Common/Logging/Log.h"
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index 5012dea9d8..79275bc21a 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -5,23 +5,24 @@
#include <algorithm>
#include <memory>
#include <mutex>
+#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
+#include "Common/Assert.h"
#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
#include "Core/HW/Memmap.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/IndexGenerator.h"
+#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexLoaderBase.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VertexShaderManager.h"
-#include "VideoCommon/VideoCommon.h"
-
-
namespace VertexLoaderManager
{
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.h b/Source/Core/VideoCommon/VertexLoaderManager.h
index 4a1c64fd1e..6341872de9 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.h
+++ b/Source/Core/VideoCommon/VertexLoaderManager.h
@@ -8,7 +8,8 @@
#include "Common/CommonTypes.h"
#include "VideoCommon/DataReader.h"
-#include "VideoCommon/NativeVertexFormat.h"
+
+class NativeVertexFormat;
namespace VertexLoaderManager
{
diff --git a/Source/Core/VideoCommon/VertexLoaderUtils.h b/Source/Core/VideoCommon/VertexLoaderUtils.h
index 88ab1bda1e..7f18101f93 100644
--- a/Source/Core/VideoCommon/VertexLoaderUtils.h
+++ b/Source/Core/VideoCommon/VertexLoaderUtils.h
@@ -5,13 +5,13 @@
#pragma once
#include <cstring>
+
#include "Common/Common.h"
-#include "VideoCommon/VertexManagerBase.h"
+#include "Common/CommonTypes.h"
extern u8* g_video_buffer_read_ptr;
extern u8* g_vertex_manager_write_ptr;
-
__forceinline void DataSkip(u32 skip)
{
g_video_buffer_read_ptr += skip;
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index 08e96aaef5..9fc5346290 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -2,12 +2,18 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <cstring>
+#include <string>
+
#include "Common/BitSet.h"
#include "Common/Common.h"
+#include "Common/CommonTypes.h"
#include "Common/CPUDetect.h"
#include "Common/Intrinsics.h"
#include "Common/JitRegister.h"
#include "Common/x64ABI.h"
+#include "Common/x64Emitter.h"
+#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexLoaderX64.h"
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.h b/Source/Core/VideoCommon/VertexLoaderX64.h
index 2d5ff72beb..87539acaaf 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.h
+++ b/Source/Core/VideoCommon/VertexLoaderX64.h
@@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/CommonTypes.h"
#include "Common/x64Emitter.h"
#include "VideoCommon/VertexLoaderBase.h"
diff --git a/Source/Core/VideoCommon/VertexLoader_Color.cpp b/Source/Core/VideoCommon/VertexLoader_Color.cpp
index 603be269b3..5d8d4e8bd2 100644
--- a/Source/Core/VideoCommon/VertexLoader_Color.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Color.cpp
@@ -4,15 +4,12 @@
#include <cstring>
-#include "Common/Common.h"
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
-
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_Color.h"
#include "VideoCommon/VertexLoaderManager.h"
-#include "VideoCommon/VertexManagerBase.h"
-#include "VideoCommon/VideoCommon.h"
+#include "VideoCommon/VertexLoaderUtils.h"
#define AMASK 0xFF000000
diff --git a/Source/Core/VideoCommon/VertexLoader_Color.h b/Source/Core/VideoCommon/VertexLoader_Color.h
index 98eb1ef4e5..0f83dc4b29 100644
--- a/Source/Core/VideoCommon/VertexLoader_Color.h
+++ b/Source/Core/VideoCommon/VertexLoader_Color.h
@@ -4,8 +4,6 @@
#pragma once
-#include "VideoCommon/NativeVertexFormat.h"
-
class VertexLoader;
void Color_ReadDirect_24b_888(VertexLoader* loader);
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
index 5561d51c7a..12c9cbca71 100644
--- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
@@ -6,12 +6,13 @@
#include <type_traits>
#include "Common/Common.h"
+#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
+#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_Normal.h"
#include "VideoCommon/VertexLoaderManager.h"
-#include "VideoCommon/VertexManagerBase.h"
-#include "VideoCommon/VideoCommon.h"
+#include "VideoCommon/VertexLoaderUtils.h"
// warning: mapping buffer should be disabled to use this
#define LOG_NORM() // PRIM_LOG("norm: %f %f %f, ", ((float*)g_vertex_manager_write_ptr)[-3], ((float*)g_vertex_manager_write_ptr)[-2], ((float*)g_vertex_manager_write_ptr)[-1]);
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.h b/Source/Core/VideoCommon/VertexLoader_Normal.h
index ff9532272b..d2a817eaeb 100644
--- a/Source/Core/VideoCommon/VertexLoader_Normal.h
+++ b/Source/Core/VideoCommon/VertexLoader_Normal.h
@@ -4,7 +4,7 @@
#pragma once
-#include "VideoCommon/NativeVertexFormat.h"
+#include "Common/CommonTypes.h"
class VertexLoader_Normal
{
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp
index 609038ab3e..75e954d269 100644
--- a/Source/Core/VideoCommon/VertexLoader_Position.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp
@@ -2,14 +2,16 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <limits>
#include <type_traits>
-#include "Common/Common.h"
+#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
+#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_Position.h"
#include "VideoCommon/VertexLoaderManager.h"
-#include "VideoCommon/VertexManagerBase.h"
+#include "VideoCommon/VertexLoaderUtils.h"
#include "VideoCommon/VideoCommon.h"
template <typename T>
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.h b/Source/Core/VideoCommon/VertexLoader_Position.h
index 306a1a8c4a..644fee5785 100644
--- a/Source/Core/VideoCommon/VertexLoader_Position.h
+++ b/Source/Core/VideoCommon/VertexLoader_Position.h
@@ -4,7 +4,7 @@
#pragma once
-#include "VideoCommon/NativeVertexFormat.h"
+#include "Common/CommonTypes.h"
class VertexLoader_Position
{
diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
index 764efe7279..3318a808cc 100644
--- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
@@ -4,26 +4,25 @@
#include <type_traits>
-#include "Common/Common.h"
+#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_TextCoord.h"
#include "VideoCommon/VertexLoaderManager.h"
-#include "VideoCommon/VertexManagerBase.h"
-#include "VideoCommon/VideoCommon.h"
+#include "VideoCommon/VertexLoaderUtils.h"
template <int N>
void LOG_TEX();
template <>
-__forceinline void LOG_TEX<1>()
+void LOG_TEX<1>()
{
// warning: mapping buffer should be disabled to use this
// PRIM_LOG("tex: %f, ", ((float*)g_vertex_manager_write_ptr)[-1]);
}
template <>
-__forceinline void LOG_TEX<2>()
+void LOG_TEX<2>()
{
// warning: mapping buffer should be disabled to use this
// PRIM_LOG("tex: %f %f, ", ((float*)g_vertex_manager_write_ptr)[-2], ((float*)g_vertex_manager_write_ptr)[-1]);
diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.h b/Source/Core/VideoCommon/VertexLoader_TextCoord.h
index 4d8d352058..b8d413f3a0 100644
--- a/Source/Core/VideoCommon/VertexLoader_TextCoord.h
+++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.h
@@ -4,7 +4,7 @@
#pragma once
-#include "VideoCommon/NativeVertexFormat.h"
+#include "Common/CommonTypes.h"
class VertexLoader_TextCoord
{
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index 19fb19c981..0816618f38 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -4,9 +4,13 @@
#include <memory>
+#include "Common/BitSet.h"
+#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
-#include "VideoCommon/BPStructs.h"
+#include "VideoCommon/BPMemory.h"
+#include "VideoCommon/DataReader.h"
#include "VideoCommon/Debugger.h"
#include "VideoCommon/GeometryShaderManager.h"
#include "VideoCommon/IndexGenerator.h"
diff --git a/Source/Core/VideoCommon/VertexManagerBase.h b/Source/Core/VideoCommon/VertexManagerBase.h
index 0e6c0efefb..0dbcc26d2d 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.h
+++ b/Source/Core/VideoCommon/VertexManagerBase.h
@@ -10,10 +10,10 @@
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "VideoCommon/DataReader.h"
-#include "VideoCommon/NativeVertexFormat.h"
class NativeVertexFormat;
class PointerWrap;
+struct PortableVertexDeclaration;
enum PrimitiveType {
PRIMITIVE_POINTS,
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index a9007978fc..ad99b445c0 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -3,7 +3,10 @@
// Refer to the license.txt file included.
#include <cmath>
+#include <cstring>
+#include "Common/Assert.h"
+#include "Common/CommonTypes.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/LightingShaderGen.h"
#include "VideoCommon/NativeVertexFormat.h"
diff --git a/Source/Core/VideoCommon/VertexShaderGen.h b/Source/Core/VideoCommon/VertexShaderGen.h
index df79751df3..e98a6a4bc2 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.h
+++ b/Source/Core/VideoCommon/VertexShaderGen.h
@@ -4,6 +4,7 @@
#pragma once
+#include "Common/CommonTypes.h"
#include "VideoCommon/LightingShaderGen.h"
#include "VideoCommon/ShaderGenCommon.h"
#include "VideoCommon/VideoCommon.h"
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index 20b41e194c..173bd51447 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -6,11 +6,14 @@
#include <cmath>
#include <cstring>
#include <sstream>
+#include <string>
#include "Common/BitSet.h"
+#include "Common/ChunkFile.h"
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "Common/MathUtil.h"
+#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "VideoCommon/BPMemory.h"
@@ -18,7 +21,6 @@
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexManagerBase.h"
-#include "VideoCommon/VertexShaderGen.h"
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
diff --git a/Source/Core/VideoCommon/VertexShaderManager.h b/Source/Core/VideoCommon/VertexShaderManager.h
index 35c146c7aa..ad3d128432 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.h
+++ b/Source/Core/VideoCommon/VertexShaderManager.h
@@ -4,8 +4,10 @@
#pragma once
+#include <string>
+
+#include "Common/CommonTypes.h"
#include "VideoCommon/ConstantManager.h"
-#include "VideoCommon/VertexShaderGen.h"
class PointerWrap;
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp
index aeca4e2827..7978f78710 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.cpp
+++ b/Source/Core/VideoCommon/VideoBackendBase.cpp
@@ -2,6 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <string>
+#include <vector>
+
// TODO: ugly
#ifdef _WIN32
#include "VideoBackends/D3D/VideoBackend.h"
diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h
index 75c26be296..79cd041b92 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.h
+++ b/Source/Core/VideoCommon/VideoBackendBase.h
@@ -7,11 +7,11 @@
#include <string>
#include <vector>
-#include "Common/ChunkFile.h"
+#include "Common/CommonTypes.h"
#include "VideoCommon/PerfQueryBase.h"
namespace MMIO { class Mapping; }
-
+class PointerWrap;
enum FieldType
{
diff --git a/Source/Core/VideoCommon/VideoCommon.h b/Source/Core/VideoCommon/VideoCommon.h
index ba339e5c4f..5a82026ed8 100644
--- a/Source/Core/VideoCommon/VideoCommon.h
+++ b/Source/Core/VideoCommon/VideoCommon.h
@@ -10,7 +10,6 @@
#include "Common/CommonTypes.h"
#include "Common/MathUtil.h"
-#include "VideoCommon/VideoBackendBase.h"
// Global flag to signal if FifoRecorder is active.
extern bool g_bRecordFifoData;
diff --git a/Source/Core/VideoCommon/VideoState.cpp b/Source/Core/VideoCommon/VideoState.cpp
index 355742367e..90c18a0368 100644
--- a/Source/Core/VideoCommon/VideoState.cpp
+++ b/Source/Core/VideoCommon/VideoState.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <cstring>
+
#include "Common/ChunkFile.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/BPMemory.h"
diff --git a/Source/Core/VideoCommon/XFMemory.cpp b/Source/Core/VideoCommon/XFMemory.cpp
index 1e9e71c5b8..0e54fea373 100644
--- a/Source/Core/VideoCommon/XFMemory.cpp
+++ b/Source/Core/VideoCommon/XFMemory.cpp
@@ -2,7 +2,6 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include "Common/Common.h"
#include "VideoCommon/XFMemory.h"
// STATE_TO_SAVE
diff --git a/Source/Core/VideoCommon/XFStructs.cpp b/Source/Core/VideoCommon/XFStructs.cpp
index 4fb7333964..402f76c493 100644
--- a/Source/Core/VideoCommon/XFStructs.cpp
+++ b/Source/Core/VideoCommon/XFStructs.cpp
@@ -2,7 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include "Common/Common.h"
+#include "Common/CommonFuncs.h"
+#include "Common/CommonTypes.h"
+#include "Common/Logging/Log.h"
#include "Core/HW/Memmap.h"
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/DataReader.h"
@@ -11,7 +13,6 @@
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VertexShaderManager.h"
-#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/XFMemory.h"
static void XFMemWritten(u32 transferSize, u32 baseAddress)