GPU: Add virtual call when buffers are swapped

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

View File

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

View File

@ -318,6 +318,7 @@ protected:
virtual void UpdateCLUT(GPUTexturePaletteReg reg, bool clut_is_8bit) = 0;
virtual void UpdateDisplay() = 0;
virtual void DrawRendererStats();
virtual void OnBufferSwapped();
ALWAYS_INLINE_RELEASE void AddDrawTriangleTicks(s32 x1, s32 y1, s32 x2, s32 y2, s32 x3, s32 y3, bool shaded,
bool textured, bool semitransparent)

View File

@ -3412,6 +3412,11 @@ void GPU_HW::UpdateDownsamplingLevels()
g_gpu_device->RecycleTexture(std::move(m_downsample_texture));
}
void GPU_HW::OnBufferSwapped()
{
GL_INS("OnBufferSwapped()");
}
void GPU_HW::DownsampleFramebuffer()
{
GPUTexture* source = m_display_texture;

View File

@ -200,6 +200,7 @@ private:
void UpdateCLUT(GPUTexturePaletteReg reg, bool clut_is_8bit) 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);