From a4327702f1924cc9972d6f50695ee81913afa618 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Mar 2014 16:51:38 -0700 Subject: [PATCH] Reduce some includes under GPU/. --- Core/HLE/sceDmac.cpp | 1 + Core/HLE/sceGe.cpp | 2 +- Core/MIPS/ARM/ArmAsm.h | 3 +-- GPU/GLES/GLES_GPU.h | 1 - GPU/GLES/SoftwareTransform.cpp | 1 + GPU/GLES/Spline.cpp | 3 ++- GPU/GLES/TransformPipeline.cpp | 4 ++++ GPU/GLES/TransformPipeline.h | 8 ++++---- GPU/GPUCommon.cpp | 4 ++-- GPU/GPUCommon.h | 2 +- GPU/GPUInterface.h | 12 +++++++++--- 11 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Core/HLE/sceDmac.cpp b/Core/HLE/sceDmac.cpp index d1fb479ba1..dc0dc5f25f 100644 --- a/Core/HLE/sceDmac.cpp +++ b/Core/HLE/sceDmac.cpp @@ -20,6 +20,7 @@ #include "Core/MemMap.h" #include "Core/Reporting.h" #include "Core/HLE/HLE.h" +#include "Core/HLE/sceKernel.h" #include "Core/HLE/FunctionWrappers.h" #include "Core/Debugger/Breakpoints.h" #include "GPU/GPUInterface.h" diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index ef168b2d5e..c5ae73a79c 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -173,7 +173,7 @@ void __GeExecuteSync(u64 userdata, int cyclesLate) int listid = userdata >> 32; WaitType waitType = (WaitType) (userdata & 0xFFFFFFFF); bool wokeThreads = __GeTriggerWait(waitType, listid); - gpu->SyncEnd(waitType, listid, wokeThreads); + gpu->SyncEnd(waitType == WAITTYPE_GELISTSYNC ? GPU_SYNC_LIST : GPU_SYNC_DRAW, listid, wokeThreads); } void __GeExecuteInterrupt(u64 userdata, int cyclesLate) diff --git a/Core/MIPS/ARM/ArmAsm.h b/Core/MIPS/ARM/ArmAsm.h index 5b9a556251..57c2931f85 100644 --- a/Core/MIPS/ARM/ArmAsm.h +++ b/Core/MIPS/ARM/ArmAsm.h @@ -18,8 +18,7 @@ #ifndef _JIT64ASM_H #define _JIT64ASM_H -#include "../MIPS.h" -#include +#include "Core/MIPS/MIPS.h" // Runtime generated assembly routines, like the Dispatcher. diff --git a/GPU/GLES/GLES_GPU.h b/GPU/GLES/GLES_GPU.h index 5742741f89..f42ba94324 100644 --- a/GPU/GLES/GLES_GPU.h +++ b/GPU/GLES/GLES_GPU.h @@ -24,7 +24,6 @@ #include "GPU/GPUCommon.h" #include "GPU/GLES/Framebuffer.h" -#include "GPU/GLES/VertexDecoder.h" #include "GPU/GLES/TransformPipeline.h" #include "GPU/GLES/TextureCache.h" diff --git a/GPU/GLES/SoftwareTransform.cpp b/GPU/GLES/SoftwareTransform.cpp index a2e6125991..cacd8331a7 100644 --- a/GPU/GLES/SoftwareTransform.cpp +++ b/GPU/GLES/SoftwareTransform.cpp @@ -21,6 +21,7 @@ #include "Core/Config.h" #include "GPU/GPUState.h" #include "GPU/Math3D.h" +#include "GPU/Common/VertexDecoderCommon.h" #include "GPU/GLES/ShaderManager.h" #include "GPU/GLES/TransformPipeline.h" diff --git a/GPU/GLES/Spline.cpp b/GPU/GLES/Spline.cpp index ecabd25c0b..75dda22dc1 100644 --- a/GPU/GLES/Spline.cpp +++ b/GPU/GLES/Spline.cpp @@ -15,7 +15,8 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "TransformPipeline.h" +#include "GPU/GLES/TransformPipeline.h" +#include "GPU/GLES/VertexDecoder.h" #include "Core/Config.h" #include "Core/MemMap.h" #include "GPU/Math3D.h" diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 56ad4d08e5..317e0251a1 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -843,6 +843,10 @@ bool TransformDrawEngine::TestBoundingBox(void* control_points, int vertexCount, return true; } +bool TransformDrawEngine::IsCodePtrVertexDecoder(const u8 *ptr) const { + return decJitCache_->IsInSpace(ptr); +} + // TODO: Probably move this to common code (with normalization?) static Vec3f ClipToScreen(const Vec4f& coords) { diff --git a/GPU/GLES/TransformPipeline.h b/GPU/GLES/TransformPipeline.h index bee7621bd3..40d35fed56 100644 --- a/GPU/GLES/TransformPipeline.h +++ b/GPU/GLES/TransformPipeline.h @@ -21,7 +21,6 @@ #include "GPU/Common/GPUDebugInterface.h" #include "GPU/Common/IndexGenerator.h" -#include "GPU/GLES/VertexDecoder.h" #include "gfx/gl_common.h" #include "gfx/gl_lost_manager.h" @@ -29,6 +28,9 @@ class LinkedShader; class ShaderManager; class TextureCache; class FramebufferManager; +class VertexDecoder; +class VertexDecoderJitCache; +struct TransformedVertex; struct DecVtxFormat; @@ -134,9 +136,7 @@ public: DoFlush(); } - bool IsCodePtrVertexDecoder(const u8 *ptr) const { - return decJitCache_->IsInSpace(ptr); - } + bool IsCodePtrVertexDecoder(const u8 *ptr) const; // Really just for convenience to share with softgpu. static u32 NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, VertexDecoder *dec, int lowerBound, int upperBound, u32 vertType); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 0fed1c8e72..f14a777e99 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1031,9 +1031,9 @@ void GPUCommon::InterruptEnd(int listid) { } // TODO: Maybe cleaner to keep this in GE and trigger the clear directly? -void GPUCommon::SyncEnd(WaitType waitType, int listid, bool wokeThreads) { +void GPUCommon::SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads) { easy_guard guard(listLock); - if (waitType == WAITTYPE_GEDRAWSYNC && wokeThreads) + if (waitType == GPU_SYNC_DRAW && wokeThreads) { for (int i = 0; i < DisplayListMaxCount; ++i) { if (dls[i].state == PSP_GE_DL_STATE_COMPLETED) { diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 7ddbd39b53..6f53879939 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -23,7 +23,7 @@ public: virtual void InterruptStart(int listid); virtual void InterruptEnd(int listid); - virtual void SyncEnd(WaitType waitType, int listid, bool wokeThreads); + virtual void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads); virtual void EnableInterrupts(bool enable) { interruptsEnabled_ = enable; } diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index 2032e3dc85..62d9bae30a 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -21,9 +21,9 @@ #include #include "GPU/GPUState.h" -#include "Core/HLE/sceKernelThread.h" -#include "Core/HLE/sceGe.h" +#include "Core/MemMap.h" +struct PspGeListArgs; class PointerWrap; enum DisplayListStatus { @@ -98,6 +98,12 @@ enum GPUState GPUSTATE_ERROR = 4, }; +enum GPUSyncType +{ + GPU_SYNC_DRAW, + GPU_SYNC_LIST, +}; + // Used for debug struct FramebufferInfo { @@ -203,7 +209,7 @@ public: virtual void InterruptStart(int listid) = 0; virtual void InterruptEnd(int listid) = 0; - virtual void SyncEnd(WaitType waitType, int listid, bool wokeThreads) = 0; + virtual void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads) = 0; virtual void PreExecuteOp(u32 op, u32 diff) = 0; virtual void ExecuteOp(u32 op, u32 diff) = 0;