Remove unnecessary header includes

- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
This commit is contained in:
Lassi Hämäläinen 2018-09-29 01:12:00 +03:00 committed by Ivan
parent 23432d420d
commit c963c51a60
72 changed files with 120 additions and 139 deletions

View file

@ -1,7 +1,5 @@
#pragma once
#include <stdio.h>
#include <string.h>
#include <array>
#include "utils.h"

View file

@ -1,7 +1,8 @@
#include "stdafx.h"
#include "CPUThread.h"
#include "Emu/System.h"
#include "Emu/Memory/vm_locking.h"
#include "CPUThread.h"
#include "Emu/IdManager.h"
#include "Utilities/GDBDebugServer.h"
#include "Emu/Cell/PPUThread.h"

View file

@ -1,10 +1,11 @@
#include "stdafx.h"
#include "MFC.h"
#include "Utilities/sysinfo.h"
#include "Emu/Memory/vm.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/lv2/sys_sync.h"
#include "Emu/System.h"
#include "MFC.h"
template <>
void fmt_class_string<MFC>::format(std::string& out, u64 arg)

View file

@ -1,7 +1,8 @@
#include "stdafx.h"
#include "PPUAnalyser.h"
#include "PPUOpcodes.h"
#include "PPUModule.h"
#include "PPUAnalyser.h"
#include <unordered_set>
#include "yaml-cpp/yaml.h"

View file

@ -1,4 +1,6 @@
#include "stdafx.h"
#include "PPUFunction.h"
#include "PPUModule.h"
extern std::string ppu_get_syscall_name(u64 code)

View file

@ -1,8 +1,9 @@
#include "stdafx.h"
#include "PPUInterpreter.h"
#include "Emu/Memory/vm_reservation.h"
#include "Emu/System.h"
#include "PPUThread.h"
#include "PPUInterpreter.h"
#include "Utilities/asm.h"
#include "Emu/Cell/Common.h"

View file

@ -1,4 +1,6 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "Utilities/VirtualMemory.h"
#include "Utilities/bin_patch.h"
#include "Crypto/sha1.h"
@ -8,7 +10,6 @@
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUOpcodes.h"
#include "Emu/Cell/PPUModule.h"
#include "Emu/Cell/PPUAnalyser.h"
#include "Emu/Cell/lv2/sys_prx.h"

View file

@ -2,9 +2,9 @@
#ifdef LLVM_AVAILABLE
#include "../rpcs3/Emu/CPU/CPUTranslator.h"
#include "../rpcs3/Emu/Cell/PPUOpcodes.h"
#include "../rpcs3/Emu/Cell/PPUAnalyser.h"
#include "Emu/CPU/CPUTranslator.h"
#include "PPUOpcodes.h"
#include "PPUAnalyser.h"
class PPUTranslator final : public cpu_translator
{

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "SPUASMJITRecompiler.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
@ -14,8 +15,6 @@
#include <mutex>
#include <thread>
#include "SPUASMJITRecompiler.h"
#define SPU_OFF_128(x, ...) asmjit::x86::oword_ptr(*cpu, offset32(&spu_thread::x, ##__VA_ARGS__))
#define SPU_OFF_64(x, ...) asmjit::x86::qword_ptr(*cpu, offset32(&spu_thread::x, ##__VA_ARGS__))
#define SPU_OFF_32(x, ...) asmjit::x86::dword_ptr(*cpu, offset32(&spu_thread::x, ##__VA_ARGS__))

View file

@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "SPUInterpreter.h"
#include "Emu/System.h"
#include "Utilities/JIT.h"
#include "Utilities/sysinfo.h"
#include "Utilities/asm.h"
#include "SPUThread.h"
#include "SPUInterpreter.h"
#include "Emu/Cell/Common.h"
#include <cmath>

View file

@ -1,7 +1,8 @@
#include "stdafx.h"
#include "SPURecompiler.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Memory/vm.h"
#include "Crypto/sha1.h"
#include "Utilities/StrUtil.h"
#include "Utilities/JIT.h"
@ -11,7 +12,6 @@
#include "SPUAnalyser.h"
#include "SPUInterpreter.h"
#include "SPUDisAsm.h"
#include "SPURecompiler.h"
#include <algorithm>
#include <mutex>
#include <thread>

View file

@ -1,13 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_cond.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_mutex.h"
#include "sys_cond.h"
LOG_CHANNEL(sys_cond);

View file

@ -1,8 +1,7 @@
#include "stdafx.h"
#include "sys_dbg.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Memory/vm.h"
#include "sys_dbg.h"
#include "Emu/Cell/Modules/sys_lv2dbg.h"
LOG_CHANNEL(sys_dbg);

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_event.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
@ -8,7 +9,6 @@
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUThread.h"
#include "sys_process.h"
#include "sys_event.h"

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_event_flag.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_event_flag.h"
#include <algorithm>

View file

@ -1,12 +1,8 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_gamepad.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
LOG_CHANNEL(sys_gamepad);

View file

@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_gpio.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_gpio.h"
error_code sys_gpio_get(u64 device_id, vm::ptr<u64> value)
{

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_interrupt.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/PPUOpcodes.h"
#include "sys_interrupt.h"
LOG_CHANNEL(sys_interrupt);

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_lwcond.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_lwmutex.h"
#include "sys_lwcond.h"
LOG_CHANNEL(sys_lwcond);

View file

@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_lwmutex.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_lwmutex.h"
LOG_CHANNEL(sys_lwmutex);

View file

@ -1,8 +1,9 @@
#include "stdafx.h"
#include "sys_memory.h"
#include "Utilities/VirtualMemory.h"
#include "Emu/Memory/vm_locking.h"
#include "Emu/IdManager.h"
#include "sys_memory.h"
LOG_CHANNEL(sys_memory);

View file

@ -1,11 +1,12 @@
#include "stdafx.h"
#include "sys_mmapper.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_ppu_thread.h"
#include "Emu/Cell/lv2/sys_event.h"
#include "Emu/Memory/vm_var.h"
#include "Utilities/VirtualMemory.h"
#include "sys_memory.h"
#include "sys_mmapper.h"
LOG_CHANNEL(sys_mmapper);

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_mutex.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_mutex.h"
LOG_CHANNEL(sys_mutex);

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_net.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUThread.h"
#include "Utilities/Thread.h"
#include "sys_sync.h"
#include "sys_net.h"
#ifdef _WIN32
#include <winsock2.h>

View file

@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_ppu_thread.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_ppu_thread.h"
#include "sys_event.h"
#include "sys_mmapper.h"

View file

@ -1,5 +1,5 @@
#include "stdafx.h"
#include "Utilities/types.h"
#include "sys_process.h"
#include "Emu/Memory/vm_ptr.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
@ -23,7 +23,6 @@
#include "sys_timer.h"
#include "sys_trace.h"
#include "sys_fs.h"
#include "sys_process.h"

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_prx.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Crypto/unself.h"
@ -8,7 +9,6 @@
#include "Emu/Cell/ErrorCodes.h"
#include "Crypto/unedat.h"
#include "sys_fs.h"
#include "sys_prx.h"

View file

@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "stdafx.h"
#include "sys_rsx.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
#include "Emu/RSX/GSRender.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_rsx.h"
#include "sys_event.h"

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_rwlock.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_rwlock.h"

View file

@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_semaphore.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_semaphore.h"

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_spu.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Crypto/unself.h"
@ -14,7 +15,6 @@
#include "sys_interrupt.h"
#include "sys_mmapper.h"
#include "sys_event.h"
#include "sys_spu.h"
LOG_CHANNEL(sys_spu);

View file

@ -1,7 +1,8 @@
#include "stdafx.h"
#include "sys_ss.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_ss.h"
#ifdef _WIN32
#include <Windows.h>

View file

@ -1,10 +1,9 @@
#include "stdafx.h"
#include "Emu/Memory/vm_ptr.h"
#include "Emu/System.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_time.h"
#include "Emu/System.h"
#include "Emu/Cell/ErrorCodes.h"
#ifdef _WIN32
#include <Windows.h>

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_timer.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
@ -7,7 +8,6 @@
#include "Emu/Cell/PPUThread.h"
#include "sys_event.h"
#include "sys_process.h"
#include "sys_timer.h"
#include <thread>

View file

@ -1,9 +1,9 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_trace.h"
#include "Emu/System.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_trace.h"

View file

@ -1,9 +1,9 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_usbd.h"
#include "Emu/System.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_usbd.h"
#include "sys_ppu_thread.h"

View file

@ -5,7 +5,6 @@
#include "vm_reservation.h"
#include "vm_var.h"
#include "Emu/System.h"
#include "Utilities/mutex.h"
#include "Utilities/cond.h"
#include "Utilities/Thread.h"

View file

@ -1,10 +1,8 @@
#pragma once
#include <map>
#include <functional>
#include <memory>
#include "Utilities/types.h"
#include "Utilities/Atomic.h"
#include "Utilities/VirtualMemory.h"
#include "Utilities/StrFmt.h"
#include "Utilities/BEType.h"

View file

@ -3,6 +3,8 @@
#include "vm.h"
#include "Utilities/cond.h"
#include "Utilities/Atomic.h"
class notifier;
namespace vm

View file

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "CgBinaryProgram.h"
#include "Emu/System.h"
#include "CgBinaryProgram.h"
#include "Emu/RSX/RSXFragmentProgram.h"
#include <algorithm>

View file

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "CgBinaryProgram.h"
#include "Emu/System.h"
#include "CgBinaryProgram.h"
#include "Emu/RSX/RSXVertexProgram.h"
void CgBinaryDisasm::AddScaCodeDisasm(const std::string& code)

View file

@ -2,6 +2,7 @@
#include "BufferUtils.h"
#include "../rsx_methods.h"
#include "Utilities/sysinfo.h"
#include "../RSXThread.h"
#include <limits>

View file

@ -3,8 +3,7 @@
#include <vector>
#include "Utilities/GSL.h"
#include "Emu/Memory/vm.h"
#include "../RSXThread.h"
#include "../gcm_enums.h"
/**
* Write count vertex attributes from src_ptr.

View file

@ -2,7 +2,6 @@
#include "Emu/RSX/RSXFragmentProgram.h"
#include "Emu/RSX/RSXVertexProgram.h"
#include "Emu/Memory/vm.h"
#include "Utilities/GSL.h"
#include "Utilities/hash.h"

View file

@ -1,7 +1,6 @@
#pragma once
#include "../rsx_cache.h"
#include "../rsx_utils.h"
#include "texture_cache_predictor.h"
#include "TextureUtils.h"

View file

@ -3,6 +3,7 @@
#include "Emu/Memory/vm_ptr.h"
#include "gcm_enums.h"
#include "gcm_printing.h"
#include "Utilities/Atomic.h"
struct CellGcmControl

View file

@ -1,6 +1,6 @@
#include "stdafx.h"
#include <set>
#include "Emu/Memory/vm.h"
#include "GLFragmentProgram.h"
#include "Emu/System.h"
#include "GLHelpers.h"
#include "GLFragmentProgram.h"

View file

@ -1,8 +1,6 @@
#pragma once
#include "../Common/FragmentProgramDecompiler.h"
#include "Emu/RSX/RSXFragmentProgram.h"
#include "Utilities/Thread.h"
#include "OpenGL.h"
struct GLFragmentDecompilerThread : public FragmentProgramDecompiler
{

View file

@ -8,6 +8,8 @@
#include "GLTextOut.h"
#include "GLOverlays.h"
#include <optional>
#pragma comment(lib, "opengl32.lib")
namespace gl

View file

@ -1,5 +1,4 @@
#include "stdafx.h"
#include "../rsx_methods.h"
#include "stdafx.h"
#include "GLGSRender.h"
#include "Emu/System.h"

View file

@ -1,8 +1,6 @@
#pragma once
#pragma once
#include "../Common/surface_store.h"
#include "GLHelpers.h"
#include "stdafx.h"
#include "../RSXThread.h"
#include "../rsx_utils.h"
struct color_swizzle

View file

@ -3,7 +3,6 @@
#include "../GCM.h"
#include "../RSXThread.h"
#include "../RSXTexture.h"
#include "../rsx_utils.h"
namespace gl
{

View file

@ -18,7 +18,6 @@
#include "GLTexture.h"
#include "../Common/TextureUtils.h"
#include "../Common/texture_cache.h"
#include "../../Memory/vm.h"
class GLGSRender;

View file

@ -1,6 +1,5 @@
#include "stdafx.h"
#include "stdafx.h"
#include "GLGSRender.h"
#include "../rsx_methods.h"
#include "../Common/BufferUtils.h"
#include "GLHelpers.h"

View file

@ -1,10 +1,10 @@
#include "stdafx.h"
#include "GLVertexProgram.h"
#include "Emu/System.h"
#include "GLVertexProgram.h"
#include "GLCommonDecompiler.h"
#include "GLHelpers.h"
#include "../GCM.h"
#include "../Common/GLSLCommon.h"
#include <algorithm>

View file

@ -1,8 +1,6 @@
#pragma once
#include "../Common/VertexProgramDecompiler.h"
#include "Emu/RSX/RSXVertexProgram.h"
#include "Utilities/Thread.h"
#include "OpenGL.h"
enum
{

View file

@ -2,6 +2,7 @@
#include "Emu/RSX/RSXThread.h"
#include <memory>
#include <atomic>
#ifdef _WIN32
#include <windows.h>

View file

@ -1,6 +1,7 @@
#pragma once
#include "GCM.h"
#include "RSXTexture.h"
#include "gcm_enums.h"
#include "Utilities/types.h"
enum register_type
{

View file

@ -1,8 +1,8 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "RSXThread.h"
#include "RSXTexture.h"
#include "rsx_methods.h"
#include "rsx_utils.h"
namespace rsx
{

View file

@ -1,19 +1,8 @@
#pragma once
#include "GCM.h"
#include "gcm_enums.h"
namespace rsx
{
/**
* Use an extra cubemap format
*/
enum class texture_dimension_extended : u8
{
texture_dimension_1d = 0,
texture_dimension_2d = 1,
texture_dimension_cubemap = 2,
texture_dimension_3d = 3,
};
class fragment_texture
{
protected:

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"

View file

@ -1,10 +1,6 @@
#pragma once
#include <stack>
#include <deque>
#include <set>
#include <mutex>
#include <atomic>
#include <variant>
#include "GCM.h"
#include "rsx_cache.h"

View file

@ -1,7 +1,9 @@
#pragma once
#include "RSXTexture.h"
#include "gcm_enums.h"
#include "Utilities/types.h"
#include <vector>
#include <bitset>
#include <set>
@ -245,4 +247,4 @@ struct RSXVertexProgram
{
return (rsx::texture_dimension_extended)((texture_dimensions >> (id * 2)) & 0x3);
}
};
};

View file

@ -1,9 +1,8 @@
#pragma once
#include "../Common/FragmentProgramDecompiler.h"
#include "Emu/RSX/RSXFragmentProgram.h"
#include "Utilities/Thread.h"
#include "VulkanAPI.h"
#include "../VK/VKHelpers.h"
#include "VKHelpers.h"
struct VKFragmentDecompilerThread : public FragmentProgramDecompiler
{

View file

@ -9,9 +9,10 @@
#include "VKProgramBuffer.h"
#include "VKFramebuffer.h"
#include "../GCM.h"
#include "../rsx_utils.h"
#include <thread>
#include <atomic>
#include <optional>
namespace vk
{

View file

@ -1,14 +1,14 @@
#pragma once
#pragma once
#include "stdafx.h"
#include <exception>
#include <string>
#include <cstring>
#include <functional>
#include <vector>
#include <memory>
#include <unordered_map>
#include <variant>
#include <stack>
#if !defined(_WIN32) && !defined(__APPLE__)
#include <X11/Xutil.h>
@ -19,9 +19,8 @@
#include "VulkanAPI.h"
#include "VKCommonDecompiler.h"
#include "../GCM.h"
#include "../Common/TextureUtils.h"
#include "../Common/ring_buffer_helper.h"
#include "../rsx_cache.h"
#include "../Common/TextureUtils.h"
#include "3rdparty/GPUOpen/include/vk_mem_alloc.h"

View file

@ -7,7 +7,6 @@
#include "../Common/surface_store.h"
#include "../Common/TextureUtils.h"
#include "../Common/texture_cache_utils.h"
#include "../rsx_utils.h"
namespace vk
{

View file

@ -1,11 +1,10 @@
#pragma once
#pragma once
#include "stdafx.h"
#include "VKRenderTargets.h"
#include "VKGSRender.h"
#include "VKCompute.h"
#include "Emu/System.h"
#include "../Common/TextureUtils.h"
#include "../rsx_utils.h"
#include "Utilities/mutex.h"
#include "../Common/texture_cache.h"

View file

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "Utilities/types.h"
namespace rsx
@ -139,6 +139,17 @@ namespace rsx
fog_mode to_fog_mode(u32 in);
/**
* Use an extra cubemap format
*/
enum class texture_dimension_extended : u8
{
texture_dimension_1d = 0,
texture_dimension_2d = 1,
texture_dimension_cubemap = 2,
texture_dimension_3d = 3,
};
enum class texture_dimension : u8
{
dimension1d,

View file

@ -1,7 +1,6 @@
#include "stdafx.h"
#include "rsx_utils.h"
#include "rsx_methods.h"
#include "RSXThread.h"
#include "Emu/RSX/GCM.h"
#include "Common/BufferUtils.h"
#include "Overlays/overlays.h"

View file

@ -4,13 +4,10 @@
#include "Utilities/address_range.h"
#include "Utilities/geometry.h"
#include "Utilities/asm.h"
#include "Utilities/VirtualMemory.h"
#include "Emu/Memory/vm.h"
#include "gcm_enums.h"
#include <atomic>
#include <memory>
#include <bitset>
#include <optional>
extern "C"
{

View file

@ -1,10 +1,9 @@
#pragma once
#include "GCM.h"
#include "gcm_enums.h"
#include "rsx_decode.h"
#include "Utilities/types.h"
#include "Utilities/BEType.h"
#include "rsx_utils.h"
namespace rsx