1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Minor corrections in DepthBufferToRDRAM::CopyToRDRAM

This commit is contained in:
Sergey Lipskiy 2015-04-01 19:06:14 +06:00
parent f96d54bd1f
commit e4599870f3
2 changed files with 4 additions and 4 deletions

View File

@ -939,7 +939,7 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
if (VI.width == 0) // H width is zero. Don't copy
return false;
if (m_lastDList == RSP.DList) // Already read;
return false;
return true;
FrameBuffer *pBuffer = frameBufferList().findBuffer(_address);
if (pBuffer == NULL || pBuffer->m_width < VI.width || pBuffer->m_pDepthBuffer == NULL || !pBuffer->m_pDepthBuffer->m_cleared)
return false;
@ -996,7 +996,7 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
glEnable(GL_SCISSOR_TEST);
gDP.changed |= CHANGED_SCISSOR;
return true;
}
#endif // GLES2

View File

@ -946,10 +946,10 @@ bool texturedRectDepthBufferCopy(const OGLRender::TexturedRectParams & _params)
// Load of arbitrary data to that area causes weird camera rotation in CBFD.
const gDPTile * pTile = gSP.textureTile[0];
if (pTile->loadType == LOADTYPE_BLOCK && gDP.textureImage.size == 2 && gDP.textureImage.address >= gDP.depthImageAddress && gDP.textureImage.address < (gDP.depthImageAddress + gDP.colorImage.width*gDP.colorImage.width * 6 / 4)) {
if (!config.frameBufferEmulation.enable)
if (config.frameBufferEmulation.enable == 0)
return true;
frameBufferList().getCurrent()->m_cleared = true;
if (!config.frameBufferEmulation.copyDepthToRDRAM)
if (config.frameBufferEmulation.copyDepthToRDRAM == 0)
return true;
if (FrameBuffer_CopyDepthBuffer(gDP.colorImage.address))
RDP_RepeatLastLoadBlock();