From b62e36e997f93d7361452edec13e47a3eac60292 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 27 Oct 2013 16:50:03 -0700 Subject: [PATCH] Support frameskip in softgpu. --- GPU/Software/SoftGpu.cpp | 8 ++++++-- GPU/Software/SoftGpu.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 9ada32d82..24044d6e9 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -349,7 +349,9 @@ void SoftGPU::ExecuteOp(u32 op, u32 diff) } cyclesExecuted += EstimatePerVertexCost() * count; - TransformUnit::SubmitPrimitive(verts, indices, type, count, gstate.vertType); + if (!(gstate_c.skipDrawReason & SKIPDRAW_SKIPFRAME)) { + TransformUnit::SubmitPrimitive(verts, indices, type, count, gstate.vertType); + } } break; @@ -389,7 +391,9 @@ void SoftGPU::ExecuteOp(u32 op, u32 diff) break; } - TransformUnit::SubmitSpline(control_points, indices, sp_ucount, sp_vcount, sp_utype, sp_vtype, gstate.getPatchPrimitiveType(), gstate.vertType); + if (!(gstate_c.skipDrawReason & SKIPDRAW_SKIPFRAME)) { + TransformUnit::SubmitSpline(control_points, indices, sp_ucount, sp_vcount, sp_utype, sp_vtype, gstate.getPatchPrimitiveType(), gstate.vertType); + } DEBUG_LOG(G3D,"DL DRAW SPLINE: %i x %i, %i x %i", sp_ucount, sp_vcount, sp_utype, sp_vtype); } break; diff --git a/GPU/Software/SoftGpu.h b/GPU/Software/SoftGpu.h index 2359c7323..99e4c52b1 100644 --- a/GPU/Software/SoftGpu.h +++ b/GPU/Software/SoftGpu.h @@ -73,6 +73,10 @@ public: fullInfo = "Software"; } + virtual bool FramebufferReallyDirty() { + return !(gstate_c.skipDrawReason & SKIPDRAW_SKIPFRAME); + } + virtual bool GetCurrentFramebuffer(GPUDebugBuffer &buffer); virtual bool GetCurrentDepthbuffer(GPUDebugBuffer &buffer); virtual bool GetCurrentStencilbuffer(GPUDebugBuffer &buffer);