mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +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);
|
memcpy(m_RdramCopy.data(), RDRAM + m_startAddress, dataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrameBuffer::setDirty()
|
||||||
|
{
|
||||||
|
m_cleared = false;
|
||||||
|
m_RdramCopy.clear();
|
||||||
|
}
|
||||||
|
|
||||||
bool FrameBuffer::isValid(bool _forceCheck) const
|
bool FrameBuffer::isValid(bool _forceCheck) const
|
||||||
{
|
{
|
||||||
if (!_forceCheck) {
|
if (!_forceCheck) {
|
||||||
|
|
|
@ -24,6 +24,7 @@ struct FrameBuffer
|
||||||
CachedTexture * getTextureBG(u32 _t);
|
CachedTexture * getTextureBG(u32 _t);
|
||||||
void setBufferClearParams(u32 _fillcolor, s32 _ulx, s32 _uly, s32 _lrx, s32 _lry);
|
void setBufferClearParams(u32 _fillcolor, s32 _ulx, s32 _uly, s32 _lrx, s32 _lry);
|
||||||
void copyRdram();
|
void copyRdram();
|
||||||
|
void setDirty();
|
||||||
bool isValid(bool _forceCheck) const;
|
bool isValid(bool _forceCheck) const;
|
||||||
bool _isMarioTennisScoreboard() const;
|
bool _isMarioTennisScoreboard() const;
|
||||||
bool isAuxiliary() const;
|
bool isAuxiliary() const;
|
||||||
|
|
|
@ -724,7 +724,7 @@ void GraphicsDrawer::drawTriangles()
|
||||||
gDP.otherMode.depthUpdate != 0) {
|
gDP.otherMode.depthUpdate != 0) {
|
||||||
FrameBuffer * pCurrentDepthBuffer = frameBufferList().findBuffer(gDP.depthImageAddress);
|
FrameBuffer * pCurrentDepthBuffer = frameBufferList().findBuffer(gDP.depthImageAddress);
|
||||||
if (pCurrentDepthBuffer != nullptr)
|
if (pCurrentDepthBuffer != nullptr)
|
||||||
pCurrentDepthBuffer->m_cleared = false;
|
pCurrentDepthBuffer->setDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,7 +786,7 @@ void GraphicsDrawer::drawDMATriangles(u32 _numVtx)
|
||||||
gDP.otherMode.depthUpdate != 0) {
|
gDP.otherMode.depthUpdate != 0) {
|
||||||
FrameBuffer * pCurrentDepthBuffer = frameBufferList().findBuffer(gDP.depthImageAddress);
|
FrameBuffer * pCurrentDepthBuffer = frameBufferList().findBuffer(gDP.depthImageAddress);
|
||||||
if (pCurrentDepthBuffer != nullptr)
|
if (pCurrentDepthBuffer != nullptr)
|
||||||
pCurrentDepthBuffer->m_cleared = false;
|
pCurrentDepthBuffer->setDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user