GPU: Add virtual call when buffers are swapped

This commit is contained in:
Stenzek 2024-03-24 19:57:18 +10:00
parent ae43ad9605
commit 252861f071
No known key found for this signature in database
4 changed files with 12 additions and 0 deletions

View File

@ -1211,6 +1211,7 @@ void GPU::WriteGP1(u32 value)
SynchronizeCRTC();
m_crtc_state.regs.display_address_start = new_value;
UpdateCRTCDisplayParameters();
OnBufferSwapped();
}
}
break;
@ -2704,6 +2705,10 @@ void GPU::DrawRendererStats()
{
}
void GPU::OnBufferSwapped()
{
}
void GPU::GetStatsString(SmallStringBase& str)
{
if (IsHardwareRenderer())

View File

@ -317,6 +317,7 @@ protected:
virtual void DispatchRenderCommand();
virtual void UpdateDisplay();
virtual void DrawRendererStats();
virtual void OnBufferSwapped();
ALWAYS_INLINE void AddDrawTriangleTicks(s32 x1, s32 y1, s32 x2, s32 y2, s32 x3, s32 y3, bool shaded, bool textured,
bool semitransparent)

View File

@ -3251,6 +3251,11 @@ void GPU_HW::UpdateDisplay()
RestoreDeviceContext();
}
void GPU_HW::OnBufferSwapped()
{
GL_INS("OnBufferSwapped()");
}
void GPU_HW::DownsampleFramebuffer(GPUTexture* source, u32 left, u32 top, u32 width, u32 height)
{
if (m_downsample_mode == GPUDownsampleMode::Adaptive)

View File

@ -176,6 +176,7 @@ private:
void DispatchRenderCommand() override;
void FlushRender() override;
void DrawRendererStats() override;
void OnBufferSwapped() override;
bool BlitVRAMReplacementTexture(const TextureReplacementTexture* tex, u32 dst_x, u32 dst_y, u32 width, u32 height);