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

Correct URenderTarget::update()

Depth buffer not cleared if SetDepthImage called after Fillrect.

Fixed Ocarina of Time Link's portrait missing with N64 deph compare #1850
This commit is contained in:
Sergey Lipskiy 2018-09-06 22:30:43 +07:00
parent 83e1ccb72e
commit 9b487453a6

View File

@ -671,7 +671,8 @@ public:
void update(bool _force) override
{
int renderTarget = 0;
if (gDP.colorImage.address == gDP.depthImageAddress ) {
if ((gDP.colorImage.address == gDP.depthImageAddress ) ||
(gDP.fillColor.color == DepthClearColor && gDP.otherMode.cycleType == G_CYC_FILL)) {
renderTarget = gDP.otherMode.depthCompare + 1;
}
uRenderTarget.set(renderTarget, _force);