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

Refactor update of buffer end address.

Add removeIntersections() after end address update.
This commit is contained in:
Sergey Lipskiy 2018-10-25 17:29:50 +07:00
parent 7d7b5fcee3
commit fc70172327
3 changed files with 11 additions and 5 deletions

View File

@ -655,6 +655,13 @@ FrameBuffer * FrameBufferList::findTmpBuffer(u32 _address)
return nullptr;
}
void FrameBufferList::updateCurrentBufferEndAddress()
{
if (m_pCurrent == nullptr)
return;
m_pCurrent->updateEndAddress();
removeIntersections();
}
void FrameBufferList::_createScreenSizeBuffer()
{

View File

@ -109,6 +109,7 @@ public:
FrameBuffer * findTmpBuffer(u32 _address);
FrameBuffer * getCurrent() const {return m_pCurrent;}
void setCurrent(FrameBuffer * _pCurrent) { m_pCurrent = _pCurrent; }
void updateCurrentBufferEndAddress();
void renderBuffer();
void setBufferChanged(f32 _maxY);
void clearBuffersChanged();

View File

@ -837,17 +837,15 @@ void gDPFullSync()
dwnd().getDrawer().flush();
FrameBuffer * pCurrentBuffer = frameBufferList().getCurrent();
if (pCurrentBuffer != nullptr)
pCurrentBuffer->updateEndAddress();
frameBufferList().updateCurrentBufferEndAddress();
const bool sync = config.frameBufferEmulation.copyToRDRAM == Config::ctSync;
FrameBuffer * pCurrentBuffer = frameBufferList().getCurrent();
if ((config.frameBufferEmulation.copyToRDRAM != Config::ctDisable || (config.generalEmulation.hacks & hack_subscreen) != 0) &&
!FBInfo::fbInfo.isSupported() &&
pCurrentBuffer != nullptr &&
!pCurrentBuffer->isAuxiliary()
)
FrameBuffer_CopyToRDRAM(gDP.colorImage.address, sync);
FrameBuffer_CopyToRDRAM(gDP.colorImage.address, config.frameBufferEmulation.copyToRDRAM == Config::ctSync);
if (RSP.LLE) {
if (config.frameBufferEmulation.copyDepthToRDRAM != Config::cdDisable && !FBInfo::fbInfo.isSupported())