From f83c2f0b6bd737c41f5ff5966d0b62047ffd8944 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 13 Dec 2020 14:54:43 +0300 Subject: [PATCH] rsx: Restructure and simplify some header include chains --- rpcs3/Emu/RSX/Common/texture_cache.h | 1 + rpcs3/Emu/RSX/Common/texture_cache_types.h | 120 +++++++++++++++++++++ rpcs3/Emu/RSX/Common/texture_cache_utils.h | 117 +------------------- rpcs3/Emu/RSX/GL/GLDraw.cpp | 1 + rpcs3/Emu/RSX/GL/GLGSRender.cpp | 1 + rpcs3/Emu/RSX/GL/GLRenderTargets.cpp | 1 + rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp | 1 + rpcs3/Emu/RSX/GL/GLVertexBuffers.cpp | 3 +- rpcs3/Emu/RSX/RSXThread.cpp | 1 + rpcs3/Emu/RSX/RSXThread.h | 3 +- rpcs3/Emu/RSX/VK/VKDraw.cpp | 3 +- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 1 + rpcs3/Emu/RSX/VK/VKHelpers.cpp | 1 + rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp | 2 + rpcs3/Emu/RSX/VK/VKVertexBuffers.cpp | 2 +- rpcs3/Emu/RSX/rsx_methods.h | 3 - rpcs3/Emu/System.cpp | 1 + 17 files changed, 138 insertions(+), 124 deletions(-) create mode 100644 rpcs3/Emu/RSX/Common/texture_cache_types.h diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index edbceaf8d5..35cffdc658 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -1,5 +1,6 @@ #pragma once +#include "texture_cache_utils.h" #include "texture_cache_predictor.h" #include "texture_cache_helpers.h" diff --git a/rpcs3/Emu/RSX/Common/texture_cache_types.h b/rpcs3/Emu/RSX/Common/texture_cache_types.h new file mode 100644 index 0000000000..17452fa874 --- /dev/null +++ b/rpcs3/Emu/RSX/Common/texture_cache_types.h @@ -0,0 +1,120 @@ +#pragma once + +#include "Emu/system_config.h" + +namespace rsx +{ + /** + * Helper enums/structs + */ + enum invalidation_chain_policy + { + invalidation_chain_none, // No chaining: Only sections that overlap the faulting page get invalidated. + invalidation_chain_full, // Full chaining: Sections overlapping the faulting page get invalidated, as well as any sections overlapping invalidated sections. + invalidation_chain_nearby // Invalidations chain if they are near to the fault ( +#include #include "util/asm.hpp" diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index 6f91648c7b..5b55e1e55f 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -12,9 +12,8 @@ #include "RSXOffload.h" #include "RSXVertexProgram.h" #include "RSXFragmentProgram.h" -#include "rsx_methods.h" #include "rsx_utils.h" -#include "Common/texture_cache_utils.h" +#include "Common/texture_cache_types.h" #include "Utilities/Thread.h" #include "Utilities/geometry.h" diff --git a/rpcs3/Emu/RSX/VK/VKDraw.cpp b/rpcs3/Emu/RSX/VK/VKDraw.cpp index 20a4313cad..3e1d17e320 100644 --- a/rpcs3/Emu/RSX/VK/VKDraw.cpp +++ b/rpcs3/Emu/RSX/VK/VKDraw.cpp @@ -1,6 +1,7 @@ #include "stdafx.h" -#include "VKGSRender.h" #include "../Common/BufferUtils.h" +#include "../rsx_methods.h" +#include "VKGSRender.h" namespace vk { diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index c3fbb97f6e..f4b7a44a35 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -6,6 +6,7 @@ #include "VKRenderPass.h" #include "VKResourceManager.h" #include "VKCommandStream.h" +#include "Emu/RSX/rsx_methods.h" #include "Emu/Memory/vm_locking.h" namespace vk diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.cpp b/rpcs3/Emu/RSX/VK/VKHelpers.cpp index e1241620e0..2c28cd3099 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.cpp +++ b/rpcs3/Emu/RSX/VK/VKHelpers.cpp @@ -10,6 +10,7 @@ #include "VKCommandStream.h" #include "VKRenderPass.h" +#include "Emu/RSX/rsx_methods.h" #include "Utilities/mutex.h" #include "Utilities/lockless.h" diff --git a/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp b/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp index 28c71fcfac..a3c4ca7074 100644 --- a/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp +++ b/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp @@ -3,8 +3,10 @@ #include "VKVertexProgram.h" #include "VKFragmentProgram.h" #include "VKGSRender.h" + #include "../Common/GLSLCommon.h" #include "../Common/ShaderInterpreter.h" +#include "../rsx_methods.h" namespace vk { diff --git a/rpcs3/Emu/RSX/VK/VKVertexBuffers.cpp b/rpcs3/Emu/RSX/VK/VKVertexBuffers.cpp index a9c7b0f228..3b1b6ea6fc 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexBuffers.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexBuffers.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "VKGSRender.h" -#include "../rsx_methods.h" #include "../Common/BufferUtils.h" +#include "../rsx_methods.h" namespace vk { diff --git a/rpcs3/Emu/RSX/rsx_methods.h b/rpcs3/Emu/RSX/rsx_methods.h index 593485e5dd..c9a54f1f9f 100644 --- a/rpcs3/Emu/RSX/rsx_methods.h +++ b/rpcs3/Emu/RSX/rsx_methods.h @@ -13,9 +13,6 @@ #include "rsx_utils.h" #include "Utilities/geometry.h" -#include -#include - extern u64 get_system_time(); extern bool is_primitive_disjointed(rsx::primitive_type); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 2fa324bafe..34ebc331c9 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -36,6 +36,7 @@ #include "util/logs.hpp" #include "cereal/archives/binary.hpp" +#include #include #include