1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Bind to the current frame buffer FBO when copying auxiliary buffers to

RDRAM
This commit is contained in:
fzurita 2021-05-01 17:27:42 -04:00 committed by Sergey Lipskiy
parent 6ee8c71bf0
commit f5e73a8081
2 changed files with 38 additions and 40 deletions

View File

@ -22,8 +22,6 @@ using namespace graphics;
ColorBufferToRDRAM::ColorBufferToRDRAM()
: m_pCurFrameBuffer(nullptr)
, m_frameCount(-1)
, m_startAddress(-1)
{
}
@ -84,6 +82,7 @@ bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress)
readBuffer = m_pCurFrameBuffer->m_FBO;
}
if (!m_pCurFrameBuffer->isAuxiliary()) {
u32 x0 = 0;
u32 width;
if (config.frameBufferEmulation.nativeResFactor == 0 && m_pCurFrameBuffer->m_scale != 1.0f) {
@ -121,9 +120,10 @@ bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress)
wnd.getDrawer().blitOrCopyTexturedRect(blitParams);
gfxContext.bindFramebuffer(bufferTarget::READ_FRAMEBUFFER, pBuffer->getColorFbFbo());
} else {
gfxContext.bindFramebuffer(bufferTarget::READ_FRAMEBUFFER, readBuffer);
}
m_frameCount = curFrame;
m_startAddress = _startAddress;
return true;
}

View File

@ -46,8 +46,6 @@ private:
static u32 _RGBAtoRGBA32(u32 _c, u32 x, u32 y);
FrameBuffer * m_pCurFrameBuffer;
u32 m_frameCount;
u32 m_startAddress;
static u32 m_blueNoiseIdx;
};