diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b9299dd54..5fa4c24c71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1974,7 +1974,7 @@ set(GPU_SOURCES GPU/Debugger/Stepping.h GPU/ge_constants.h GPU/GeConstants.cpp - GPU/GPUInterface.h + GPU/GPUDefinitions.h GPU/GeDisasm.cpp GPU/GeDisasm.h GPU/GPU.cpp diff --git a/Core/Core.cpp b/Core/Core.cpp index f7e6978853..367a2dea71 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -408,6 +408,8 @@ bool Core_Run(GraphicsContext *ctx) { switch (coreState) { case CORE_RUNNING_CPU: case CORE_STEPPING_CPU: + case CORE_RUNNING_GE: + case CORE_STEPPING_GE: // enter a fast runloop Core_RunLoop(ctx); if (coreState == CORE_POWERDOWN) { diff --git a/Core/Font/PGF.cpp b/Core/Font/PGF.cpp index 8edb182729..c01a1b6d37 100644 --- a/Core/Font/PGF.cpp +++ b/Core/Font/PGF.cpp @@ -28,7 +28,7 @@ #include "Core/Font/PGF.h" #include "Core/HLE/HLE.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" // These fonts, created by ttf2pgf, don't have complete glyph info and need to be identified. diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 8c86d1f57c..5007fadf2b 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -39,7 +39,7 @@ #include "GPU/Math3D.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #if PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 5b69540716..609f17dd00 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -54,7 +54,7 @@ #include "GPU/GPU.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/PostShader.h" #include "GPU/Debugger/Record.h" diff --git a/Core/HLE/sceDmac.cpp b/Core/HLE/sceDmac.cpp index 01abc95a0c..facda94365 100644 --- a/Core/HLE/sceDmac.cpp +++ b/Core/HLE/sceDmac.cpp @@ -25,7 +25,7 @@ #include "Core/HLE/sceKernel.h" #include "Core/HLE/FunctionWrappers.h" #include "Core/Debugger/Breakpoints.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" u64 dmacMemcpyDeadline; diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index 89c673f4d7..72722544dd 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -38,7 +38,7 @@ #include "Core/HLE/sceKernelInterrupt.h" #include "Core/HLE/KernelWaitHelpers.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" static const int LIST_ID_MAGIC = 0x35000000; diff --git a/Core/HLE/sceGe.h b/Core/HLE/sceGe.h index da8f90d020..50c91deea0 100644 --- a/Core/HLE/sceGe.h +++ b/Core/HLE/sceGe.h @@ -17,7 +17,7 @@ #pragma once -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "Core/MemMap.h" #define SCE_GE_LIST_COMPLETED 0 diff --git a/Core/HLE/sceKernel.cpp b/Core/HLE/sceKernel.cpp index 6013359545..f6d654405b 100644 --- a/Core/HLE/sceKernel.cpp +++ b/Core/HLE/sceKernel.cpp @@ -37,7 +37,7 @@ #include "Core/Reporting.h" #include "Core/SaveState.h" #include "Core/System.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "__sceAudio.h" diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index c6812d403d..28f7ae87d3 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -70,7 +70,7 @@ #include "GPU/Debugger/Playback.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" enum { diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 7893c40768..2de25ca7fb 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -31,7 +31,7 @@ #include "Core/HW/MediaEngine.h" #include "Core/MemMapHelpers.h" #include "Core/Reporting.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "Core/HLE/sceKernelMemory.h" #include "Core/Core.h" diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index 1e08e9fbfd..5fc9bddbb9 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -30,7 +30,7 @@ #include "Core/HLE/sceKernelMemory.h" #include "Core/HW/MediaEngine.h" #include "Core/CoreTiming.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include diff --git a/Core/HW/Display.cpp b/Core/HW/Display.cpp index 146aaf8cf2..3048f98e35 100644 --- a/Core/HW/Display.cpp +++ b/Core/HW/Display.cpp @@ -29,7 +29,7 @@ #include "Core/HLE/sceKernel.h" #include "Core/HW/Display.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" // Called when vblank happens (like an internal interrupt.) Not part of state, should be static. static std::mutex listenersLock; diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index d7fb5388d0..5370f881c8 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -26,7 +26,7 @@ #include "Core/Reporting.h" #include "GPU/GPUState.h" // Used by TextureDecoder.h when templates get instanced #include "GPU/Common/TextureDecoder.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "Core/HW/SimpleAudioDec.h" #include diff --git a/Core/Reporting.cpp b/Core/Reporting.cpp index fab4efc812..d6041885f0 100644 --- a/Core/Reporting.cpp +++ b/Core/Reporting.cpp @@ -57,7 +57,7 @@ extern "C" { #include "Core/HLE/sceKernelMemory.h" #include "Core/HLE/scePower.h" #include "Core/HW/Display.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" namespace Reporting diff --git a/Core/Screenshot.cpp b/Core/Screenshot.cpp index 3a7066ba35..d30a99aa4f 100644 --- a/Core/Screenshot.cpp +++ b/Core/Screenshot.cpp @@ -31,7 +31,7 @@ #include "Core/Core.h" #include "GPU/Common/GPUDebugInterface.h" #include "GPU/Common/FramebufferManagerCommon.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" // This is used to make non-ASCII paths work for filename. diff --git a/Core/System.cpp b/Core/System.cpp index de8930e41f..d8b956e3fd 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -72,7 +72,7 @@ #include "Common/ExceptionHandlerSetup.h" #include "Core/HLE/sceAudiocodec.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Debugger/RecordFormat.h" #include "Core/RetroAchievements.h" diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index 4bbd7e145a..94ca1c6af9 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -35,7 +35,7 @@ #include "Core/HDRemaster.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "Core/FileSystems/MetaFileSystem.h" #include "Core/Util/PPGeDraw.h" #include "Core/HLE/sceKernel.h" diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index c06e73b7c6..a37dd3a581 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -50,7 +50,7 @@ #include "GPU/Debugger/Debugger.h" #include "GPU/Debugger/Record.h" #include "GPU/Debugger/Stepping.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" static size_t FormatFramebufferName(const VirtualFramebuffer *vfb, char *tag, size_t len) { diff --git a/GPU/Common/FramebufferManagerCommon.h b/GPU/Common/FramebufferManagerCommon.h index 134843ed95..37a71d751b 100644 --- a/GPU/Common/FramebufferManagerCommon.h +++ b/GPU/Common/FramebufferManagerCommon.h @@ -33,7 +33,7 @@ #include "Core/ConfigValues.h" #include "GPU/GPU.h" #include "GPU/ge_constants.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/Draw2D.h" enum { diff --git a/GPU/Common/GPUDebugInterface.cpp b/GPU/Common/GPUDebugInterface.cpp index 2585ec69bf..55dc644cd7 100644 --- a/GPU/Common/GPUDebugInterface.cpp +++ b/GPU/Common/GPUDebugInterface.cpp @@ -20,6 +20,7 @@ #include "Common/StringUtils.h" #include "Core/Debugger/SymbolMap.h" #include "GPU/Common/GPUDebugInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Debugger/Debugger.h" #include "GPU/Debugger/GECommandTable.h" #include "GPU/GPUState.h" diff --git a/GPU/Common/GPUDebugInterface.h b/GPU/Common/GPUDebugInterface.h index 91e0026e77..722672fdb6 100644 --- a/GPU/Common/GPUDebugInterface.h +++ b/GPU/Common/GPUDebugInterface.h @@ -23,11 +23,16 @@ #include "Common/Math/expression_parser.h" #include "Core/MemMap.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUDefinitions.h" +#include "GPU/GPUState.h" +#include "GPU/ge_constants.h" class FramebufferManagerCommon; class TextureCacheCommon; +struct VirtualFramebuffer; +struct DisplayList; + struct GPUDebugOp { u32 pc; u8 cmd; @@ -219,6 +224,8 @@ public: virtual void SetCmdValue(u32 op) = 0; virtual void DispatchFlush() = 0; + virtual void GetStats(char *buffer, size_t bufsize) = 0; + virtual uint32_t SetAddrTranslation(uint32_t value) = 0; virtual uint32_t GetAddrTranslation() = 0; @@ -226,6 +233,12 @@ public: virtual FramebufferManagerCommon *GetFramebufferManagerCommon() = 0; virtual TextureCacheCommon *GetTextureCacheCommon() = 0; + virtual std::vector GetFramebufferList() const = 0; + + virtual std::vector DebugGetShaderIDs(DebugShaderType shader) = 0; + virtual std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) = 0; + virtual bool DescribeCodePtr(const u8 *ptr, std::string &name) = 0; + virtual bool GetCurrentSimpleVertices(int count, std::vector &vertices, std::vector &indices) { return false; } diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 8ce7c9832c..8172f59b4e 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -42,7 +42,7 @@ #include "GPU/Debugger/Debugger.h" #include "GPU/Debugger/Record.h" #include "GPU/GPUCommon.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "Core/Util/PPGeDraw.h" diff --git a/GPU/Common/TextureCacheCommon.h b/GPU/Common/TextureCacheCommon.h index 0d617300e2..7b0c42b272 100644 --- a/GPU/Common/TextureCacheCommon.h +++ b/GPU/Common/TextureCacheCommon.h @@ -30,6 +30,7 @@ #include "GPU/Common/TextureScalerCommon.h" #include "GPU/Common/TextureShaderCommon.h" #include "GPU/Common/TextureReplacer.h" +#include "GPU/GPUDefinitions.h" class Draw2D; diff --git a/GPU/D3D11/TextureCacheD3D11.h b/GPU/D3D11/TextureCacheD3D11.h index 2da5b1d81f..334faea16f 100644 --- a/GPU/D3D11/TextureCacheD3D11.h +++ b/GPU/D3D11/TextureCacheD3D11.h @@ -22,7 +22,7 @@ #include #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/TextureCacheCommon.h" struct VirtualFramebuffer; diff --git a/GPU/Debugger/Playback.cpp b/GPU/Debugger/Playback.cpp index b19919348f..9a48243feb 100644 --- a/GPU/Debugger/Playback.cpp +++ b/GPU/Debugger/Playback.cpp @@ -36,7 +36,7 @@ #include "Core/MemMap.h" #include "Core/MIPS/MIPS.h" #include "Core/System.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" #include "GPU/Debugger/Playback.h" diff --git a/GPU/Debugger/Record.cpp b/GPU/Debugger/Record.cpp index 347e581f5a..f08b2067aa 100644 --- a/GPU/Debugger/Record.cpp +++ b/GPU/Debugger/Record.cpp @@ -38,7 +38,7 @@ #include "Core/System.h" #include "Core/ThreadPools.h" #include "GPU/Common/GPUDebugInterface.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" #include "GPU/Common/TextureDecoder.h" diff --git a/GPU/Directx9/TextureCacheDX9.h b/GPU/Directx9/TextureCacheDX9.h index ab108575d1..22991e06f9 100644 --- a/GPU/Directx9/TextureCacheDX9.h +++ b/GPU/Directx9/TextureCacheDX9.h @@ -21,7 +21,7 @@ #include #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/TextureCacheCommon.h" struct VirtualFramebuffer; diff --git a/GPU/GLES/TextureCacheGLES.h b/GPU/GLES/TextureCacheGLES.h index 966c2c9963..7538bd3052 100644 --- a/GPU/GLES/TextureCacheGLES.h +++ b/GPU/GLES/TextureCacheGLES.h @@ -21,7 +21,7 @@ #include "Common/GPU/OpenGL/GLCommon.h" #include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/GPU/thin3d.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "GPU/Common/TextureCacheCommon.h" diff --git a/GPU/GPU.cpp b/GPU/GPU.cpp index 341be4f42d..ec2938b679 100644 --- a/GPU/GPU.cpp +++ b/GPU/GPU.cpp @@ -22,7 +22,7 @@ #include "Core/Core.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #if PPSSPP_API(ANY_GL) #include "GPU/GLES/GPU_GLES.h" @@ -39,7 +39,7 @@ #endif GPUStatistics gpuStats; -GPUInterface *gpu; +GPUCommon *gpu; GPUDebugInterface *gpuDebug; template diff --git a/GPU/GPU.h b/GPU/GPU.h index d0de862466..4c86c7e815 100644 --- a/GPU/GPU.h +++ b/GPU/GPU.h @@ -21,7 +21,7 @@ #include #include -class GPUInterface; +class GPUCommon; class GPUDebugInterface; class GraphicsContext; @@ -153,7 +153,7 @@ struct GPUStatistics { }; extern GPUStatistics gpuStats; -extern GPUInterface *gpu; +extern GPUCommon *gpu; extern GPUDebugInterface *gpuDebug; namespace Draw { diff --git a/GPU/GPU.vcxproj b/GPU/GPU.vcxproj index 147e31c724..20881e306c 100644 --- a/GPU/GPU.vcxproj +++ b/GPU/GPU.vcxproj @@ -439,7 +439,7 @@ - + diff --git a/GPU/GPU.vcxproj.filters b/GPU/GPU.vcxproj.filters index c59e28ed7b..dac0350e57 100644 --- a/GPU/GPU.vcxproj.filters +++ b/GPU/GPU.vcxproj.filters @@ -33,7 +33,7 @@ Common - + Common diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index d3e2703279..ca32367867 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1523,6 +1523,7 @@ void GPUCommon::DoState(PointerWrap &p) { void GPUCommon::InterruptStart(int listid) { interruptRunning = true; } + void GPUCommon::InterruptEnd(int listid) { interruptRunning = false; isbreak = false; diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index b5abf0028c..b23fb2f569 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -1,26 +1,166 @@ #pragma once +#include +#include + #include "ppsspp_config.h" #include "Common/Common.h" +#include "Common/Swap.h" +#include "Core/MemMap.h" #include "Common/MemoryUtil.h" -#include "GPU/GPUInterface.h" +#include "GPU/ge_constants.h" +#include "GPU/GPU.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" +#include "GPU/Common/ShaderCommon.h" #include "GPU/Common/GPUDebugInterface.h" +#include "GPU/GPUDefinitions.h" #if defined(__ANDROID__) #include #endif +// X11, sigh. +#ifdef None +#undef None +#endif + class FramebufferManagerCommon; class TextureCacheCommon; class DrawEngineCommon; class GraphicsContext; +struct PspGeListArgs; +struct GPUgstate; +class PointerWrap; struct VirtualFramebuffer; namespace Draw { - class DrawContext; +class DrawContext; } +enum SignalBehavior { + PSP_GE_SIGNAL_NONE = 0x00, + PSP_GE_SIGNAL_HANDLER_SUSPEND = 0x01, + PSP_GE_SIGNAL_HANDLER_CONTINUE = 0x02, + PSP_GE_SIGNAL_HANDLER_PAUSE = 0x03, + PSP_GE_SIGNAL_SYNC = 0x08, + PSP_GE_SIGNAL_JUMP = 0x10, + PSP_GE_SIGNAL_CALL = 0x11, + PSP_GE_SIGNAL_RET = 0x12, + PSP_GE_SIGNAL_RJUMP = 0x13, + PSP_GE_SIGNAL_RCALL = 0x14, + PSP_GE_SIGNAL_OJUMP = 0x15, + PSP_GE_SIGNAL_OCALL = 0x16, + + PSP_GE_SIGNAL_RTBP0 = 0x20, + PSP_GE_SIGNAL_RTBP1 = 0x21, + PSP_GE_SIGNAL_RTBP2 = 0x22, + PSP_GE_SIGNAL_RTBP3 = 0x23, + PSP_GE_SIGNAL_RTBP4 = 0x24, + PSP_GE_SIGNAL_RTBP5 = 0x25, + PSP_GE_SIGNAL_RTBP6 = 0x26, + PSP_GE_SIGNAL_RTBP7 = 0x27, + PSP_GE_SIGNAL_OTBP0 = 0x28, + PSP_GE_SIGNAL_OTBP1 = 0x29, + PSP_GE_SIGNAL_OTBP2 = 0x2A, + PSP_GE_SIGNAL_OTBP3 = 0x2B, + PSP_GE_SIGNAL_OTBP4 = 0x2C, + PSP_GE_SIGNAL_OTBP5 = 0x2D, + PSP_GE_SIGNAL_OTBP6 = 0x2E, + PSP_GE_SIGNAL_OTBP7 = 0x2F, + PSP_GE_SIGNAL_RCBP = 0x30, + PSP_GE_SIGNAL_OCBP = 0x38, + PSP_GE_SIGNAL_BREAK1 = 0xF0, + PSP_GE_SIGNAL_BREAK2 = 0xFF, +}; + +enum GPURunState { + GPUSTATE_RUNNING = 0, + GPUSTATE_DONE = 1, + GPUSTATE_STALL = 2, + GPUSTATE_INTERRUPT = 3, + GPUSTATE_ERROR = 4, +}; + +enum GPUSyncType { + GPU_SYNC_DRAW, + GPU_SYNC_LIST, +}; + +enum class WriteStencil { + NEEDS_CLEAR = 1, + STENCIL_IS_ZERO = 2, + IGNORE_ALPHA = 4, +}; +ENUM_CLASS_BITOPS(WriteStencil); + +enum class GPUCopyFlag { + NONE = 0, + FORCE_SRC_MATCH_MEM = 1, + FORCE_DST_MATCH_MEM = 2, + // Note: implies src == dst and FORCE_SRC_MATCH_MEM. + MEMSET = 4, + DEPTH_REQUESTED = 8, + DEBUG_NOTIFIED = 16, + DISALLOW_CREATE_VFB = 32, +}; +ENUM_CLASS_BITOPS(GPUCopyFlag); + +struct DisplayListStackEntry { + u32 pc; + u32 offsetAddr; + u32 baseAddr; +}; + +struct DisplayList { + int id; + u32 startpc; + u32 pc; + u32 stall; + DisplayListState state; + SignalBehavior signal; + int subIntrBase; + u16 subIntrToken; + DisplayListStackEntry stack[32]; + int stackptr; + bool interrupted; + u64 waitTicks; + bool interruptsEnabled; + bool pendingInterrupt; + bool started; + PSPPointer context; + u32 offsetAddr; + bool bboxResult; + u32 stackAddr; + + u32 padding; // Android x86-32 does not round the structure size up to the closest multiple of 8 like the other platforms. +}; + +namespace Draw { +class DrawContext; +} + +enum class DLRunType { + Run, + RunDebug, + Step, +}; + +enum class DLStepType { + None, + Single, + Prim, + Draw, + Texture, + Rendertarget, +}; + +enum class DLResult { + Done, + Error, + Pause, // used for stepping, breakpoints +}; + enum DrawType { DRAW_UNKNOWN, DRAW_PRIM, @@ -78,71 +218,91 @@ inline bool IsTrianglePrim(GEPrimitiveType prim) { return prim > GE_PRIM_LINE_STRIP && prim != GE_PRIM_RECTANGLES; } -class GPUCommon : public GPUInterface, public GPUDebugInterface { +class GPUCommon : public GPUDebugInterface { public: GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw); + virtual ~GPUCommon() {} - Draw::DrawContext *GetDrawContext() override { + Draw::DrawContext *GetDrawContext() { return draw_; } virtual u32 CheckGPUFeatures() const = 0; virtual void UpdateCmdInfo() = 0; - bool IsStarted() override { + virtual bool IsStarted() { return true; } - void Reinitialize() override; + virtual void Reinitialize(); - void BeginHostFrame() override; - void EndHostFrame() override; + virtual void BeginHostFrame(); + virtual void EndHostFrame(); - void InterruptStart(int listid) override; - void InterruptEnd(int listid) override; - void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads) override; - void EnableInterrupts(bool enable) override { + void InterruptStart(int listid); + void InterruptEnd(int listid); + void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads); + void EnableInterrupts(bool enable) { interruptsEnabled_ = enable; } - void NotifyDisplayResized() override; - void NotifyRenderResized() override; - void NotifyConfigChanged() override; + virtual void CheckDisplayResized() = 0; + virtual void CheckConfigChanged() = 0; - void DumpNextFrame() override; + virtual void NotifyDisplayResized(); + virtual void NotifyRenderResized(); + virtual void NotifyConfigChanged(); + + void DumpNextFrame(); virtual void PreExecuteOp(u32 op, u32 diff) {} bool InterpretList(DisplayList &list); - DLResult ProcessDLQueue(DLRunType run, DLStepType step) override; - u32 UpdateStall(int listid, u32 newstall) override; - u32 EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer args, bool head) override; - u32 DequeueList(int listid) override; - int ListSync(int listid, int mode) override; - u32 DrawSync(int mode) override; - int GetStack(int index, u32 stackPtr) override; - bool GetMatrix24(GEMatrixType type, u32_le *result, u32 cmdbits) override; - void ResetMatrices() override; - void DoState(PointerWrap &p) override; - bool BusyDrawing() override; - u32 Continue() override; - u32 Break(int mode) override; - void ReapplyGfxState() override; + DLResult ProcessDLQueue(DLRunType run, DLStepType step); + u32 UpdateStall(int listid, u32 newstall); + u32 EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer args, bool head); + u32 DequeueList(int listid); + virtual int ListSync(int listid, int mode); + virtual u32 DrawSync(int mode); + int GetStack(int index, u32 stackPtr); + virtual bool GetMatrix24(GEMatrixType type, u32_le *result, u32 cmdbits); + virtual void ResetMatrices(); + virtual void DoState(PointerWrap &p); + bool BusyDrawing(); + u32 Continue(); + u32 Break(int mode); + + virtual bool FramebufferDirty() = 0; + virtual bool FramebufferReallyDirty() = 0; + + virtual void ReapplyGfxState(); + + virtual void DeviceLost() = 0; + virtual void DeviceRestore(Draw::DrawContext *draw) = 0; void SwitchToGe(); - void DrawImGuiDebugger() override; + void DrawImGuiDebugger(); uint32_t SetAddrTranslation(uint32_t value) override; uint32_t GetAddrTranslation() override; - void CopyDisplayToOutput(bool reallyDirty) override = 0; - bool PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags = GPUCopyFlag::NONE) override; - bool PerformMemorySet(u32 dest, u8 v, int size) override; - bool PerformReadbackToMemory(u32 dest, int size) override; - bool PerformWriteColorFromMemory(u32 dest, int size) override; + virtual void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) = 0; + virtual void CopyDisplayToOutput(bool reallyDirty) = 0; + virtual bool PresentedThisFrame() const = 0; - void PerformWriteFormattedFromMemory(u32 addr, int size, int width, GEBufferFormat format) override; - bool PerformWriteStencilFromMemory(u32 dest, int size, WriteStencil flags) override; + // Invalidate any cached content sourced from the specified range. + // If size = -1, invalidate everything. + virtual void InvalidateCache(u32 addr, int size, GPUInvalidationType type) = 0; + + virtual bool PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags = GPUCopyFlag::NONE); + virtual bool PerformMemorySet(u32 dest, u8 v, int size); + virtual bool PerformReadbackToMemory(u32 dest, int size); + virtual bool PerformWriteColorFromMemory(u32 dest, int size); + + virtual void PerformWriteFormattedFromMemory(u32 addr, int size, int width, GEBufferFormat format); + virtual bool PerformWriteStencilFromMemory(u32 dest, int size, WriteStencil flags); + + virtual void ExecuteOp(u32 op, u32 diff) = 0; void Execute_OffsetAddr(u32 op, u32 diff); void Execute_Vaddr(u32 op, u32 diff); @@ -216,28 +376,30 @@ public: GPUgstate GetGState() override; void SetCmdValue(u32 op) override; - DisplayList* getList(int listid) override { + DisplayList* getList(int listid) { return &dls[listid]; } - const std::list& GetDisplayLists() override { + const std::list& GetDisplayLists() { return dlQueue; } - s64 GetListTicks(int listid) const override { + s64 GetListTicks(int listid) const { if (listid >= 0 && listid < DisplayListMaxCount) { return dls[listid].waitTicks; } return -1; } - void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) override { + virtual void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) { primaryInfo = reportingPrimaryInfo_; fullInfo = reportingFullInfo_; } + void PSPFrame(); + protected: - void ClearCacheNextFrame() override {} + virtual void ClearCacheNextFrame() {} virtual void CheckRenderResized() {} @@ -256,8 +418,6 @@ protected: } } - void PSPFrame() override; - virtual void CheckDepthUsage(VirtualFramebuffer *vfb) {} virtual void FastRunLoop(DisplayList &list) = 0; @@ -284,6 +444,10 @@ protected: virtual void UpdateMSAALevel(Draw::DrawContext *draw) {} + enum { + DisplayListMaxCount = 64 + }; + DrawEngineCommon *drawEngineCommon_ = nullptr; // TODO: These should live in GPUCommonHW. diff --git a/GPU/GPUDefinitions.h b/GPU/GPUDefinitions.h new file mode 100644 index 0000000000..e5d640f113 --- /dev/null +++ b/GPU/GPUDefinitions.h @@ -0,0 +1,55 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#pragma once + +enum DisplayListStatus { + // The list has been completed + PSP_GE_LIST_COMPLETED = 0, + // The list is queued but not executed yet + PSP_GE_LIST_QUEUED = 1, + // The list is currently being executed + PSP_GE_LIST_DRAWING = 2, + // The list was stopped because it encountered stall address + PSP_GE_LIST_STALLING = 3, + // The list is paused because of a signal or sceGeBreak + PSP_GE_LIST_PAUSED = 4, +}; + +enum DisplayListState { + // No state assigned, the list is empty + PSP_GE_DL_STATE_NONE = 0, + // The list has been queued + PSP_GE_DL_STATE_QUEUED = 1, + // The list is being executed + PSP_GE_DL_STATE_RUNNING = 2, + // The list was completed and will be removed + PSP_GE_DL_STATE_COMPLETED = 3, + // The list has been paused by a signal + PSP_GE_DL_STATE_PAUSED = 4, +}; + +enum GPUInvalidationType { + // Affects all memory. Not considered highly. + GPU_INVALIDATE_ALL, + // Indicates some memory may have changed. + GPU_INVALIDATE_HINT, + // Reliable invalidation (where any hashing, etc. is unneeded, it'll always invalidate.) + GPU_INVALIDATE_SAFE, + // Forced invalidation for when the texture hash may not catch changes. + GPU_INVALIDATE_FORCE, +}; diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h deleted file mode 100644 index 7daccb1f78..0000000000 --- a/GPU/GPUInterface.h +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) 2012- PPSSPP Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0 or later versions. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official git repository and contact information can be found at -// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. - -#pragma once - -#include -#include -#include - -#include "Common/Common.h" -#include "Common/Swap.h" -#include "GPU/GPU.h" -#include "Core/MemMap.h" -#include "GPU/ge_constants.h" -#include "GPU/Common/ShaderCommon.h" - -struct PspGeListArgs; -struct GPUgstate; -class PointerWrap; -struct VirtualFramebuffer; - -enum DisplayListStatus { - // The list has been completed - PSP_GE_LIST_COMPLETED = 0, - // The list is queued but not executed yet - PSP_GE_LIST_QUEUED = 1, - // The list is currently being executed - PSP_GE_LIST_DRAWING = 2, - // The list was stopped because it encountered stall address - PSP_GE_LIST_STALLING = 3, - // The list is paused because of a signal or sceGeBreak - PSP_GE_LIST_PAUSED = 4, -}; - -enum DisplayListState { - // No state assigned, the list is empty - PSP_GE_DL_STATE_NONE = 0, - // The list has been queued - PSP_GE_DL_STATE_QUEUED = 1, - // The list is being executed - PSP_GE_DL_STATE_RUNNING = 2, - // The list was completed and will be removed - PSP_GE_DL_STATE_COMPLETED = 3, - // The list has been paused by a signal - PSP_GE_DL_STATE_PAUSED = 4, -}; - -enum SignalBehavior { - PSP_GE_SIGNAL_NONE = 0x00, - PSP_GE_SIGNAL_HANDLER_SUSPEND = 0x01, - PSP_GE_SIGNAL_HANDLER_CONTINUE = 0x02, - PSP_GE_SIGNAL_HANDLER_PAUSE = 0x03, - PSP_GE_SIGNAL_SYNC = 0x08, - PSP_GE_SIGNAL_JUMP = 0x10, - PSP_GE_SIGNAL_CALL = 0x11, - PSP_GE_SIGNAL_RET = 0x12, - PSP_GE_SIGNAL_RJUMP = 0x13, - PSP_GE_SIGNAL_RCALL = 0x14, - PSP_GE_SIGNAL_OJUMP = 0x15, - PSP_GE_SIGNAL_OCALL = 0x16, - - PSP_GE_SIGNAL_RTBP0 = 0x20, - PSP_GE_SIGNAL_RTBP1 = 0x21, - PSP_GE_SIGNAL_RTBP2 = 0x22, - PSP_GE_SIGNAL_RTBP3 = 0x23, - PSP_GE_SIGNAL_RTBP4 = 0x24, - PSP_GE_SIGNAL_RTBP5 = 0x25, - PSP_GE_SIGNAL_RTBP6 = 0x26, - PSP_GE_SIGNAL_RTBP7 = 0x27, - PSP_GE_SIGNAL_OTBP0 = 0x28, - PSP_GE_SIGNAL_OTBP1 = 0x29, - PSP_GE_SIGNAL_OTBP2 = 0x2A, - PSP_GE_SIGNAL_OTBP3 = 0x2B, - PSP_GE_SIGNAL_OTBP4 = 0x2C, - PSP_GE_SIGNAL_OTBP5 = 0x2D, - PSP_GE_SIGNAL_OTBP6 = 0x2E, - PSP_GE_SIGNAL_OTBP7 = 0x2F, - PSP_GE_SIGNAL_RCBP = 0x30, - PSP_GE_SIGNAL_OCBP = 0x38, - PSP_GE_SIGNAL_BREAK1 = 0xF0, - PSP_GE_SIGNAL_BREAK2 = 0xFF, -}; - -enum GPURunState { - GPUSTATE_RUNNING = 0, - GPUSTATE_DONE = 1, - GPUSTATE_STALL = 2, - GPUSTATE_INTERRUPT = 3, - GPUSTATE_ERROR = 4, -}; - -enum GPUSyncType { - GPU_SYNC_DRAW, - GPU_SYNC_LIST, -}; - -enum class WriteStencil { - NEEDS_CLEAR = 1, - STENCIL_IS_ZERO = 2, - IGNORE_ALPHA = 4, -}; -ENUM_CLASS_BITOPS(WriteStencil); - -enum class GPUCopyFlag { - NONE = 0, - FORCE_SRC_MATCH_MEM = 1, - FORCE_DST_MATCH_MEM = 2, - // Note: implies src == dst and FORCE_SRC_MATCH_MEM. - MEMSET = 4, - DEPTH_REQUESTED = 8, - DEBUG_NOTIFIED = 16, - DISALLOW_CREATE_VFB = 32, -}; -ENUM_CLASS_BITOPS(GPUCopyFlag); - -struct DisplayListStackEntry { - u32 pc; - u32 offsetAddr; - u32 baseAddr; -}; - -struct DisplayList { - int id; - u32 startpc; - u32 pc; - u32 stall; - DisplayListState state; - SignalBehavior signal; - int subIntrBase; - u16 subIntrToken; - DisplayListStackEntry stack[32]; - int stackptr; - bool interrupted; - u64 waitTicks; - bool interruptsEnabled; - bool pendingInterrupt; - bool started; - PSPPointer context; - u32 offsetAddr; - bool bboxResult; - u32 stackAddr; - - u32 padding; // Android x86-32 does not round the structure size up to the closest multiple of 8 like the other platforms. -}; - -enum GPUInvalidationType { - // Affects all memory. Not considered highly. - GPU_INVALIDATE_ALL, - // Indicates some memory may have changed. - GPU_INVALIDATE_HINT, - // Reliable invalidation (where any hashing, etc. is unneeded, it'll always invalidate.) - GPU_INVALIDATE_SAFE, - // Forced invalidation for when the texture hash may not catch changes. - GPU_INVALIDATE_FORCE, -}; - -namespace Draw { -class DrawContext; -} - -enum class DLRunType { - Run, - RunDebug, - Step, -}; - -enum class DLStepType { - None, - Single, - Prim, - Draw, - Texture, - Rendertarget, -}; - -enum class DLResult { - Done, - Error, - Pause, // used for stepping, breakpoints -}; - -class GPUInterface { -public: - virtual ~GPUInterface() {} - - static const int DisplayListMaxCount = 64; - - virtual Draw::DrawContext *GetDrawContext() = 0; - - // Initialization - virtual bool IsStarted() = 0; - virtual void Reinitialize() = 0; - - // Frame managment - virtual void BeginHostFrame() = 0; - virtual void EndHostFrame() = 0; - - virtual void CheckDisplayResized() = 0; - virtual void CheckConfigChanged() = 0; - - // Draw queue management - virtual DisplayList* getList(int listid) = 0; - // TODO: Much of this should probably be shared between the different GPU implementations. - virtual u32 EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer args, bool head) = 0; - virtual u32 DequeueList(int listid) = 0; - virtual u32 UpdateStall(int listid, u32 newstall) = 0; - virtual DLResult ProcessDLQueue(DLRunType run, DLStepType step) = 0; - - virtual u32 DrawSync(int mode) = 0; - virtual int ListSync(int listid, int mode) = 0; - virtual u32 Continue() = 0; - virtual u32 Break(int mode) = 0; - virtual int GetStack(int index, u32 stackPtr) = 0; - virtual bool GetMatrix24(GEMatrixType type, u32_le *result, u32 cmdbits) = 0; - virtual void ResetMatrices() = 0; - virtual uint32_t SetAddrTranslation(uint32_t value) = 0; - - virtual void InterruptStart(int listid) = 0; - virtual void InterruptEnd(int listid) = 0; - virtual void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads) = 0; - - virtual void ExecuteOp(u32 op, u32 diff) = 0; - - // Framebuffer management - virtual void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) = 0; - virtual void PSPFrame() = 0; - virtual void CopyDisplayToOutput(bool reallyDirty) = 0; - - // Tells the GPU to update the gpuStats structure. - virtual void GetStats(char *buffer, size_t bufsize) = 0; - virtual void DrawImGuiDebugger() = 0; - - // Invalidate any cached content sourced from the specified range. - // If size = -1, invalidate everything. - virtual void InvalidateCache(u32 addr, int size, GPUInvalidationType type) = 0; - // Clear caches, update hardware framebuffers, or similar based on written pixels of known format (typically video.) - virtual void PerformWriteFormattedFromMemory(u32 addr, int size, int width, GEBufferFormat format) = 0; - // Update either RAM from VRAM, or VRAM from RAM... or even VRAM from VRAM. - virtual bool PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags = GPUCopyFlag::NONE) = 0; - virtual bool PerformMemorySet(u32 dest, u8 v, int size) = 0; - // Update PSP memory with render results. - virtual bool PerformReadbackToMemory(u32 dest, int size) = 0; - // Update rendering data (i.e. hardware framebuffers) with data in PSP memory. Format unspecified. - virtual bool PerformWriteColorFromMemory(u32 dest, int size) = 0; - virtual bool PerformWriteStencilFromMemory(u32 dest, int size, WriteStencil flags = WriteStencil::NEEDS_CLEAR) = 0; - - // Will cause the texture cache to be cleared at the start of the next frame. - virtual void ClearCacheNextFrame() = 0; - - // Internal hack to avoid interrupts from "PPGe" drawing (utility UI, etc) - virtual void EnableInterrupts(bool enable) = 0; - - virtual void DeviceLost() = 0; - virtual void DeviceRestore(Draw::DrawContext *draw) = 0; - virtual void ReapplyGfxState() = 0; - virtual void DoState(PointerWrap &p) = 0; - - // Called by the window system if the window size changed. This will be reflected in PSPCoreParam.pixel*. - virtual void NotifyDisplayResized() = 0; - virtual void NotifyRenderResized() = 0; - virtual void NotifyConfigChanged() = 0; - - virtual bool FramebufferDirty() = 0; - virtual bool FramebufferReallyDirty() = 0; - virtual bool BusyDrawing() = 0; - virtual bool PresentedThisFrame() const = 0; - - // If any jit is being used inside the GPU. - virtual bool DescribeCodePtr(const u8 *ptr, std::string &name) = 0; - - // Debugging - virtual void DumpNextFrame() = 0; - virtual void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) = 0; - virtual const std::list& GetDisplayLists() = 0; - // TODO: Currently Qt only, needs to be cleaned up. - virtual std::vector GetFramebufferList() const = 0; - virtual s64 GetListTicks(int listid) const = 0; - - // For debugging. The IDs returned are opaque, do not poke in them or display them in any way. - virtual std::vector DebugGetShaderIDs(DebugShaderType type) = 0; - virtual std::string DebugGetShaderString(std::string id, DebugShaderType type, DebugShaderStringType stringType) = 0; -}; diff --git a/GPU/GPUState.cpp b/GPU/GPUState.cpp index 94bc154c6c..201d35b99c 100644 --- a/GPU/GPUState.cpp +++ b/GPU/GPUState.cpp @@ -24,7 +24,7 @@ #include "Core/System.h" #include "Core/MemMap.h" #include "GPU/ge_constants.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #ifdef _M_SSE diff --git a/GPU/GeDisasm.cpp b/GPU/GeDisasm.cpp index a5ecee595e..c4d4613356 100644 --- a/GPU/GeDisasm.cpp +++ b/GPU/GeDisasm.cpp @@ -19,7 +19,7 @@ #include "Core/MemMap.h" #include "GPU/ge_constants.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "GPU/GeDisasm.h" diff --git a/GPU/Vulkan/DebugVisVulkan.cpp b/GPU/Vulkan/DebugVisVulkan.cpp index b6d59965b5..b37cbadbd3 100644 --- a/GPU/Vulkan/DebugVisVulkan.cpp +++ b/GPU/Vulkan/DebugVisVulkan.cpp @@ -46,7 +46,7 @@ bool comparePushBufferNames(const GPUMemoryManager *a, const GPUMemoryManager *b return strcmp(a->Name(), b->Name()) < 0; } -void DrawGPUMemoryVis(UIContext *ui, GPUInterface *gpu) { +void DrawGPUMemoryVis(UIContext *ui, GPUDebugInterface *gpu) { // This one will simply display stats. Draw::DrawContext *draw = ui->GetDrawContext(); @@ -97,7 +97,7 @@ void DrawGPUMemoryVis(UIContext *ui, GPUInterface *gpu) { ui->Flush(); } -void DrawGPUProfilerVis(UIContext *ui, GPUInterface *gpu) { +void DrawGPUProfilerVis(UIContext *ui, GPUDebugInterface *gpu) { using namespace Draw; const int padding = 10 + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_LEFT); const int starty = 50 + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_TOP); diff --git a/GPU/Vulkan/DebugVisVulkan.h b/GPU/Vulkan/DebugVisVulkan.h index 5e2fae38f8..e3bf24a062 100644 --- a/GPU/Vulkan/DebugVisVulkan.h +++ b/GPU/Vulkan/DebugVisVulkan.h @@ -19,9 +19,9 @@ #include "Common/GPU/thin3d.h" -class GPUInterface; +class GPUDebugInterface; class UIContext; // gpu MUST be an instance of GPU_Vulkan. If not, will definitely crash. -void DrawGPUMemoryVis(UIContext *ui, GPUInterface *gpu); -void DrawGPUProfilerVis(UIContext *ui, GPUInterface *gpu); +void DrawGPUMemoryVis(UIContext *ui, GPUDebugInterface *gpu); +void DrawGPUProfilerVis(UIContext *ui, GPUDebugInterface *gpu); diff --git a/GPU/Vulkan/TextureCacheVulkan.h b/GPU/Vulkan/TextureCacheVulkan.h index b2e95d0573..a858882226 100644 --- a/GPU/Vulkan/TextureCacheVulkan.h +++ b/GPU/Vulkan/TextureCacheVulkan.h @@ -18,7 +18,7 @@ #pragma once #include "Common/Data/Collections/Hashmaps.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "Common/GPU/Vulkan/VulkanContext.h" #include "GPU/Common/TextureCacheCommon.h" diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index a41fb1b76f..850743d880 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -18,7 +18,7 @@ #include "Core/HLE/sceUmd.h" #include "Core/SaveState.h" #include "Core/System.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "UI/GamepadEmu.h" MainWindow::MainWindow(QWidget *parent, bool fullscreen) : diff --git a/SDL/CocoaBarItems.mm b/SDL/CocoaBarItems.mm index 843cfd3dc3..3e84ff6034 100644 --- a/SDL/CocoaBarItems.mm +++ b/SDL/CocoaBarItems.mm @@ -15,7 +15,7 @@ #include "Core/MemMap.h" #include "Core/System.h" #include "Core/Core.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "Common/File/Path.h" #include "Common/System/System.h" #include "Common/System/Request.h" diff --git a/UI/DebugOverlay.cpp b/UI/DebugOverlay.cpp index fec216f949..43faf9a266 100644 --- a/UI/DebugOverlay.cpp +++ b/UI/DebugOverlay.cpp @@ -20,7 +20,7 @@ #include "Core/System.h" #include "Core/Util/GameDB.h" #include "GPU/GPU.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" // TODO: This should be moved here or to Common, doesn't belong in /GPU #include "GPU/Vulkan/DebugVisVulkan.h" #include "GPU/Common/FramebufferManagerCommon.h" @@ -190,7 +190,7 @@ static void DrawFrameTiming(UIContext *ctx, const Bounds &bounds) { ctx->RebindTexture(); } -void DrawFramebufferList(UIContext *ctx, GPUInterface *gpu, const Bounds &bounds) { +void DrawFramebufferList(UIContext *ctx, GPUDebugInterface *gpu, const Bounds &bounds) { if (!gpu) { return; } diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 23336d6bf0..2e3f84ee5a 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -62,7 +62,7 @@ #include "Core/MIPS/JitCommon/JitCommon.h" #include "Core/MIPS/JitCommon/JitState.h" #include "GPU/Debugger/Record.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/GPUState.h" #include "UI/MiscScreens.h" #include "UI/DevScreens.h" diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 0aa96f7249..ada8b9a3f0 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -62,7 +62,7 @@ using namespace std::placeholders; #include "Core/System.h" #include "Core/FileSystems/VirtualDiscFileSystem.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" #if !PPSSPP_PLATFORM(UWP) #include "GPU/Vulkan/DebugVisVulkan.h" diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 325fd65147..428301a83d 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -78,7 +78,7 @@ #include "GPU/Common/TextureReplacer.h" #include "GPU/Common/PostShader.h" #include "android/jni/TestRunner.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "Core/Core.h" // for Core_IsStepping diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 4c463b657a..c81d3de9f2 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -62,7 +62,7 @@ #include "UI/InstallZipScreen.h" #include "Core/Config.h" #include "Core/Loaders.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "Common/Data/Text/I18n.h" #if PPSSPP_PLATFORM(IOS) || PPSSPP_PLATFORM(MAC) diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 564c61b02a..15ca2ac43b 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -46,7 +46,7 @@ #include "Core/MIPS/JitCommon/JitCommon.h" #include "Core/HLE/sceUtility.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/PostShader.h" #include "UI/ControlMappingScreen.h" diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index e222fa4388..e8b7cb265b 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -110,7 +110,7 @@ #include "Core/TiltEventProcessor.h" #include "Core/ThreadPools.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "UI/AudioCommon.h" #include "UI/BackgroundAudio.h" #include "UI/ControlMappingScreen.h" diff --git a/UWP/GPU_UWP/GPU_UWP.vcxproj b/UWP/GPU_UWP/GPU_UWP.vcxproj index 9e22d246ef..9c1cd5c3ab 100644 --- a/UWP/GPU_UWP/GPU_UWP.vcxproj +++ b/UWP/GPU_UWP/GPU_UWP.vcxproj @@ -157,7 +157,7 @@ - + diff --git a/UWP/GPU_UWP/GPU_UWP.vcxproj.filters b/UWP/GPU_UWP/GPU_UWP.vcxproj.filters index 804554a2c5..9934806fcb 100644 --- a/UWP/GPU_UWP/GPU_UWP.vcxproj.filters +++ b/UWP/GPU_UWP/GPU_UWP.vcxproj.filters @@ -106,7 +106,7 @@ - + diff --git a/Windows/GEDebugger/CtrlDisplayListView.h b/Windows/GEDebugger/CtrlDisplayListView.h index 47729b856c..0f7a53c0af 100644 --- a/Windows/GEDebugger/CtrlDisplayListView.h +++ b/Windows/GEDebugger/CtrlDisplayListView.h @@ -2,7 +2,7 @@ #include #include "Common/CommonWindows.h" -#include "GPU/Common/GPUDebugInterface.h" +#include "GPU/GPUCommon.h" class CtrlDisplayListView { diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 12ab35ea97..0d141b55e1 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -46,7 +46,7 @@ #include "Windows/MainWindow.h" #include "Windows/main.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/GPUDebugInterface.h" #include "GPU/Common/GPUStateUtils.h" #include "GPU/GPUState.h" diff --git a/Windows/GEDebugger/GEDebugger.h b/Windows/GEDebugger/GEDebugger.h index 56f1d24746..bb747f332e 100644 --- a/Windows/GEDebugger/GEDebugger.h +++ b/Windows/GEDebugger/GEDebugger.h @@ -17,6 +17,7 @@ #pragma once +#include "Common/Common.h" #include "Common/CommonWindows.h" #include "GPU/Common/GPUDebugInterface.h" #include "GPU/Debugger/Debugger.h" diff --git a/Windows/GEDebugger/TabDisplayLists.cpp b/Windows/GEDebugger/TabDisplayLists.cpp index 2b29a91d36..0e97f6e928 100644 --- a/Windows/GEDebugger/TabDisplayLists.cpp +++ b/Windows/GEDebugger/TabDisplayLists.cpp @@ -3,7 +3,7 @@ #include "Windows/GEDebugger/CtrlDisplayListView.h" #include "Windows/MainWindow.h" #include "Windows/main.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/GPUDebugInterface.h" #include "GPU/GPUState.h" #include "Core/Config.h" diff --git a/Windows/GEDebugger/TabDisplayLists.h b/Windows/GEDebugger/TabDisplayLists.h index 5e31a49341..4843024991 100644 --- a/Windows/GEDebugger/TabDisplayLists.h +++ b/Windows/GEDebugger/TabDisplayLists.h @@ -4,7 +4,7 @@ #include "Windows/resource.h" #include "Windows/W32Util/DialogManager.h" #include "Windows/W32Util/Misc.h" -#include "GPU/Common/GPUDebugInterface.h" +#include "GPU/GPUCommon.h" class CtrlDisplayListView; diff --git a/Windows/GEDebugger/VertexPreview.cpp b/Windows/GEDebugger/VertexPreview.cpp index 054c038f99..f2c9e1bd55 100644 --- a/Windows/GEDebugger/VertexPreview.cpp +++ b/Windows/GEDebugger/VertexPreview.cpp @@ -22,7 +22,7 @@ #include "Windows/GEDebugger/SimpleGLWindow.h" #include "Core/System.h" #include "Core/Config.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/GPUDebugInterface.h" #include "GPU/Common/SplineCommon.h" #include "GPU/GPUState.h" diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index 9e0368df2b..062a052200 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -81,7 +81,7 @@ #include "Windows/CaptureDevice.h" #include "Windows/TouchInputHandler.h" #include "Windows/MainWindowMenu.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "UI/OnScreenDisplay.h" #include "UI/GameSettingsScreen.h" diff --git a/libretro/LibretroGraphicsContext.cpp b/libretro/LibretroGraphicsContext.cpp index 91d953b13c..a220353d55 100644 --- a/libretro/LibretroGraphicsContext.cpp +++ b/libretro/LibretroGraphicsContext.cpp @@ -10,7 +10,7 @@ #include "Common/Log.h" #include "Core/Config.h" #include "Core/System.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" retro_video_refresh_t LibretroGraphicsContext::video_cb; diff --git a/libretro/LibretroVulkanContext.cpp b/libretro/LibretroVulkanContext.cpp index 1249f10086..e4c5fbe544 100644 --- a/libretro/LibretroVulkanContext.cpp +++ b/libretro/LibretroVulkanContext.cpp @@ -6,7 +6,7 @@ #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "Common/Data/Text/Parsers.h" #include "libretro/LibretroVulkanContext.h" diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 244228745b..038ec48c0a 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -40,7 +40,7 @@ #include "Core/ELF/ParamSFO.h" #include "GPU/GPUState.h" -#include "GPU/GPUInterface.h" +#include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/TextureScalerCommon.h" #include "GPU/Common/PresentationCommon.h"