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

Fixed Majora's mask in-game pictures look incorrect with software depth buffer #1131

This commit is contained in:
Sergey Lipskiy 2016-09-23 12:05:48 +07:00
parent 8ea44cac8e
commit 16406bb1b0
4 changed files with 10 additions and 8 deletions

View File

@ -210,6 +210,8 @@ bool DepthBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress)
bool DepthBufferToRDRAM::copyToRDRAM(u32 _address) bool DepthBufferToRDRAM::copyToRDRAM(u32 _address)
{ {
if (config.frameBufferEmulation.copyDepthToRDRAM == Config::cdSoftwareRender)
return true;
if (!_prepareCopy(_address, false)) if (!_prepareCopy(_address, false))
return false; return false;
@ -219,6 +221,8 @@ bool DepthBufferToRDRAM::copyToRDRAM(u32 _address)
bool DepthBufferToRDRAM::copyChunkToRDRAM(u32 _address) bool DepthBufferToRDRAM::copyChunkToRDRAM(u32 _address)
{ {
if (config.frameBufferEmulation.copyDepthToRDRAM == Config::cdSoftwareRender)
return true;
if (!_prepareCopy(_address, true)) if (!_prepareCopy(_address, true))
return false; return false;

View File

@ -54,12 +54,10 @@ namespace FBInfo {
return; return;
if (pBuffer->m_isDepthBuffer) { if (pBuffer->m_isDepthBuffer) {
if (config.frameBufferEmulation.copyDepthToRDRAM != Config::cdSoftwareRender) { if (config.frameBufferEmulation.fbInfoReadDepthChunk != 0)
if (config.frameBufferEmulation.fbInfoReadDepthChunk != 0) FrameBuffer_CopyDepthBufferChunk(address);
FrameBuffer_CopyDepthBufferChunk(address); else if (pBuffer != m_pReadBuffer)
else if (pBuffer != m_pReadBuffer) FrameBuffer_CopyDepthBuffer(address);
FrameBuffer_CopyDepthBuffer(address);
}
} else { } else {
if (config.frameBufferEmulation.fbInfoReadColorChunk != 0) if (config.frameBufferEmulation.fbInfoReadColorChunk != 0)
FrameBuffer_CopyChunkToRDRAM(address); FrameBuffer_CopyChunkToRDRAM(address);

View File

@ -216,7 +216,7 @@ void RSP_ProcessDList()
} }
} }
if (config.frameBufferEmulation.copyDepthToRDRAM == Config::cdCopyFromVRam) { if (config.frameBufferEmulation.copyDepthToRDRAM != Config::cdDisable) {
if ((config.generalEmulation.hacks & hack_rectDepthBufferCopyCBFD) != 0) { if ((config.generalEmulation.hacks & hack_rectDepthBufferCopyCBFD) != 0) {
; // do nothing ; // do nothing
} else if ((config.generalEmulation.hacks & hack_rectDepthBufferCopyPD) != 0) { } else if ((config.generalEmulation.hacks & hack_rectDepthBufferCopyPD) != 0) {

View File

@ -924,7 +924,7 @@ void gDPFullSync()
FrameBuffer_CopyToRDRAM(gDP.colorImage.address, sync); FrameBuffer_CopyToRDRAM(gDP.colorImage.address, sync);
if (RSP.bLLE) { if (RSP.bLLE) {
if (config.frameBufferEmulation.copyDepthToRDRAM == Config::cdCopyFromVRam && !FBInfo::fbInfo.isSupported()) if (config.frameBufferEmulation.copyDepthToRDRAM != Config::cdDisable && !FBInfo::fbInfo.isSupported())
FrameBuffer_CopyDepthBuffer(gDP.colorImage.address); FrameBuffer_CopyDepthBuffer(gDP.colorImage.address);
} }