diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-30 23:59:54 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 19:41:24 +1300 |
| commit | 2a18b34a73f4f1bc798dab0a5eec46c222ec7429 (patch) | |
| tree | 6fad80d43ff14bc4b673bf8f68cb937503783ed0 /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 154cb4f722a9996a4134463e64c85c6bfa25d8bf (diff) | |
Wire up frame before/after events
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 8979031d3d..865d73dbed 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -31,6 +31,7 @@ #include "VideoCommon/GeometryShaderManager.h" #include "VideoCommon/OpcodeDecoding.h" #include "VideoCommon/PerfQueryBase.h" +#include "VideoCommon/Present.h" #include "VideoCommon/PixelEngine.h" #include "VideoCommon/PixelShaderManager.h" #include "VideoCommon/RenderBase.h" @@ -42,6 +43,7 @@ #include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoConfig.h" +#include "VideoCommon/VideoEvents.h" using namespace BPFunctions; @@ -340,14 +342,16 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, false, false, yScale, s_gammaLUT[PE_copy.gamma], bpmem.triggerEFBCopy.clamp_top, bpmem.triggerEFBCopy.clamp_bottom, bpmem.copyfilter.GetCoefficients()); - // This stays in to signal end of a "frame" - g_renderer->RenderToXFB(destAddr, srcRect, destStride, height, s_gammaLUT[PE_copy.gamma]); + // This is as closest as we have to an "end of the frame" + // It works 99% of the time. + AfterFrameEvent::Trigger(); + if (g_ActiveConfig.bImmediateXFB) { // below div two to convert from bytes to pixels - it expects width, not stride - g_renderer->Swap(destAddr, destStride / 2, destStride, height, - Core::System::GetInstance().GetCoreTiming().GetTicks()); + g_presenter->ImmediateSwap(destAddr, destStride / 2, destStride, height, + Core::System::GetInstance().GetCoreTiming().GetTicks()); } else { |
