mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
fix regression in Mario Tennis
This commit is contained in:
parent
0735bd0372
commit
8463c0347f
|
@ -89,7 +89,7 @@ DepthBufferToRDRAM g_dbToRDRAM;
|
||||||
#endif
|
#endif
|
||||||
RDRAMtoFrameBuffer g_RDRAMtoFB;
|
RDRAMtoFrameBuffer g_RDRAMtoFB;
|
||||||
|
|
||||||
FrameBuffer::FrameBuffer() : m_validityChecked(0), m_cleared(false), m_changed(false), m_isDepthBuffer(false),
|
FrameBuffer::FrameBuffer() : m_validityChecked(0), m_cleared(false), m_fingerprint(false), m_changed(false), m_isDepthBuffer(false),
|
||||||
m_needHeightCorrection(false), m_postProcessed(false), m_pLoadTile(NULL), m_pDepthBuffer(NULL),
|
m_needHeightCorrection(false), m_postProcessed(false), m_pLoadTile(NULL), m_pDepthBuffer(NULL),
|
||||||
m_pResolveTexture(NULL), m_resolveFBO(0), m_copiedToRdram(false), m_resolved(false)
|
m_pResolveTexture(NULL), m_resolveFBO(0), m_copiedToRdram(false), m_resolved(false)
|
||||||
{
|
{
|
||||||
|
@ -191,6 +191,7 @@ void FrameBuffer::init(u32 _address, u32 _endAddress, u16 _format, u16 _size, u1
|
||||||
m_cfb = _cfb;
|
m_cfb = _cfb;
|
||||||
m_needHeightCorrection = _width != VI.width && _width != *REG.VI_WIDTH;
|
m_needHeightCorrection = _width != VI.width && _width != *REG.VI_WIDTH;
|
||||||
m_cleared = false;
|
m_cleared = false;
|
||||||
|
m_fingerprint = false;
|
||||||
|
|
||||||
_initTexture(_format, _size, m_pTexture);
|
_initTexture(_format, _size, m_pTexture);
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);
|
glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);
|
||||||
|
@ -275,6 +276,7 @@ void FrameBuffer::copyRdram()
|
||||||
pData[start++] = 0;
|
pData[start++] = 0;
|
||||||
}
|
}
|
||||||
m_cleared = false;
|
m_cleared = false;
|
||||||
|
m_fingerprint = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -301,8 +303,7 @@ bool FrameBuffer::isValid() const
|
||||||
}
|
}
|
||||||
return wrongPixels < (m_endAddress - m_startAddress) / 400; // treshold level 1% of dwords
|
return wrongPixels < (m_endAddress - m_startAddress) / 400; // treshold level 1% of dwords
|
||||||
}
|
}
|
||||||
else if (m_width != VI.width) {
|
else if (m_fingerprint) {
|
||||||
// Auxiliary frame buffer
|
|
||||||
//check if our fingerprint is still there
|
//check if our fingerprint is still there
|
||||||
const u32 stride = m_width << m_size >> 1;
|
const u32 stride = m_width << m_size >> 1;
|
||||||
const u32 height = _cutHeight(m_startAddress, m_height, stride);
|
const u32 height = _cutHeight(m_startAddress, m_height, stride);
|
||||||
|
@ -1177,7 +1178,10 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
|
||||||
pDepthBuffer->m_cleared = false;
|
pDepthBuffer->m_cleared = false;
|
||||||
pBuffer = frameBufferList().findBuffer(pDepthBuffer->m_address);
|
pBuffer = frameBufferList().findBuffer(pDepthBuffer->m_address);
|
||||||
if (pBuffer != NULL)
|
if (pBuffer != NULL)
|
||||||
|
{
|
||||||
pBuffer->m_cleared = false;
|
pBuffer->m_cleared = false;
|
||||||
|
pBuffer->m_fingerprint = false;
|
||||||
|
}
|
||||||
|
|
||||||
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
|
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||||
|
|
|
@ -28,6 +28,7 @@ struct FrameBuffer
|
||||||
u32 m_size, m_width, m_height, m_fillcolor, m_validityChecked;
|
u32 m_size, m_width, m_height, m_fillcolor, m_validityChecked;
|
||||||
float m_scaleX, m_scaleY;
|
float m_scaleX, m_scaleY;
|
||||||
bool m_copiedToRdram;
|
bool m_copiedToRdram;
|
||||||
|
bool m_fingerprint;
|
||||||
bool m_cleared;
|
bool m_cleared;
|
||||||
bool m_changed;
|
bool m_changed;
|
||||||
bool m_cfb;
|
bool m_cfb;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user