mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Reset m_cleared and m_RdramCopy for depth buffer after software render.
Fixed #1594 Mario Tennis VS screen: line flickers
This commit is contained in:
parent
3790dbe1ed
commit
032da85357
|
@ -237,6 +237,12 @@ void FrameBuffer::copyRdram()
|
|||
memcpy(m_RdramCopy.data(), RDRAM + m_startAddress, dataSize);
|
||||
}
|
||||
|
||||
void FrameBuffer::setDirty()
|
||||
{
|
||||
m_cleared = false;
|
||||
m_RdramCopy.clear();
|
||||
}
|
||||
|
||||
bool FrameBuffer::isValid(bool _forceCheck) const
|
||||
{
|
||||
if (!_forceCheck) {
|
||||
|
|
|
@ -24,6 +24,7 @@ struct FrameBuffer
|
|||
CachedTexture * getTextureBG(u32 _t);
|
||||
void setBufferClearParams(u32 _fillcolor, s32 _ulx, s32 _uly, s32 _lrx, s32 _lry);
|
||||
void copyRdram();
|
||||
void setDirty();
|
||||
bool isValid(bool _forceCheck) const;
|
||||
bool _isMarioTennisScoreboard() const;
|
||||
bool isAuxiliary() const;
|
||||
|
|
|
@ -724,7 +724,7 @@ void GraphicsDrawer::drawTriangles()
|
|||
gDP.otherMode.depthUpdate != 0) {
|
||||
FrameBuffer * pCurrentDepthBuffer = frameBufferList().findBuffer(gDP.depthImageAddress);
|
||||
if (pCurrentDepthBuffer != nullptr)
|
||||
pCurrentDepthBuffer->m_cleared = false;
|
||||
pCurrentDepthBuffer->setDirty();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -786,7 +786,7 @@ void GraphicsDrawer::drawDMATriangles(u32 _numVtx)
|
|||
gDP.otherMode.depthUpdate != 0) {
|
||||
FrameBuffer * pCurrentDepthBuffer = frameBufferList().findBuffer(gDP.depthImageAddress);
|
||||
if (pCurrentDepthBuffer != nullptr)
|
||||
pCurrentDepthBuffer->m_cleared = false;
|
||||
pCurrentDepthBuffer->setDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user