mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Decouple XFB scanout from presentation
This commit is contained in:
@ -84,9 +84,9 @@ bool SWOGLWindow::Initialize(const WindowSystemInfo& wsi)
|
||||
return true;
|
||||
}
|
||||
|
||||
void SWOGLWindow::ShowImage(AbstractTexture* image, const EFBRectangle& xfb_region)
|
||||
void SWOGLWindow::ShowImage(const AbstractTexture* image, const EFBRectangle& xfb_region)
|
||||
{
|
||||
SW::SWTexture* sw_image = static_cast<SW::SWTexture*>(image);
|
||||
const SW::SWTexture* sw_image = static_cast<const SW::SWTexture*>(image);
|
||||
m_gl_context->Update(); // just updates the render window position and the backbuffer size
|
||||
|
||||
GLsizei glWidth = (GLsizei)m_gl_context->GetBackBufferWidth();
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
bool IsHeadless() const;
|
||||
|
||||
// Image to show, will be swapped immediately
|
||||
void ShowImage(AbstractTexture* image, const EFBRectangle& xfb_region);
|
||||
void ShowImage(const AbstractTexture* image, const EFBRectangle& xfb_region);
|
||||
|
||||
static std::unique_ptr<SWOGLWindow> Create(const WindowSystemInfo& wsi);
|
||||
|
||||
|
@ -90,12 +90,10 @@ std::unique_ptr<AbstractPipeline> SWRenderer::CreatePipeline(const AbstractPipel
|
||||
}
|
||||
|
||||
// Called on the GPU thread
|
||||
void SWRenderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& xfb_region, u64 ticks)
|
||||
void SWRenderer::RenderXFBToScreen(const AbstractTexture* texture, const EFBRectangle& xfb_region)
|
||||
{
|
||||
if (!IsHeadless())
|
||||
m_window->ShowImage(texture, xfb_region);
|
||||
|
||||
UpdateActiveConfig();
|
||||
}
|
||||
|
||||
u32 SWRenderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
|
||||
TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) override;
|
||||
|
||||
void SwapImpl(AbstractTexture* texture, const EFBRectangle& rc, u64 ticks) override;
|
||||
void RenderXFBToScreen(const AbstractTexture* texture, const EFBRectangle& rc) override;
|
||||
|
||||
void ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable,
|
||||
u32 color, u32 z) override;
|
||||
|
Reference in New Issue
Block a user