~random-stuff/mupen64plus/mupen64plus-video-gliden64

« back to all changes in this revision

Viewing changes to src/gDP.cpp

  • Committer: Sergey Lipskiy
  • Date: 2018-09-24 15:02:25 UTC
  • Revision ID: git-v1:5e1c8a6b582c289792756ddcb1b9f5066fa75442
Do not use clearDepthBuffer in FillRect. Use drawRect only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
gDPInfo gDP;
29
29
 
 
30
bool isCurrentColorImageDepthImage()
 
31
{
 
32
        return (gDP.colorImage.address == gDP.depthImageAddress) ||
 
33
                (gDP.fillColor.color == DepthClearColor && gDP.otherMode.cycleType == G_CYC_FILL);
 
34
}
 
35
 
30
36
void gDPSetOtherMode( u32 mode0, u32 mode1 )
31
37
{
32
38
        gDP.otherMode.h = mode0;
705
711
                if (gDP.fillColor.color == DepthClearColor) {
706
712
                        frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
707
713
                        depthBuffer = dbFound;
708
 
                        if (config.frameBufferEmulation.N64DepthCompare == 0 &&
709
 
                                (config.generalEmulation.enableFragmentDepthWrite == 0 ||
710
 
                                (ulx == 0 && uly == 0 && lrx == gDP.scissor.lrx && lry == gDP.scissor.lry))) {
 
714
                        if (config.generalEmulation.enableFragmentDepthWrite == 0) {
711
715
                                drawer.clearDepthBuffer(ulx, uly, lrx, lry);
712
716
                                depthBuffer = dbCleared;
713
717
                        } else
717
721
                depthBuffer = dbFound;
718
722
                depthBufferList().saveBuffer(gDP.colorImage.address);
719
723
                frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
720
 
                if (config.frameBufferEmulation.N64DepthCompare == 0 &&
721
 
                        (config.generalEmulation.enableFragmentDepthWrite == 0 ||
722
 
                        (ulx == 0 && uly == 0 && lrx == gDP.scissor.lrx && lry == gDP.scissor.lry))) {
 
724
                if (config.generalEmulation.enableFragmentDepthWrite == 0) {
723
725
                        drawer.clearDepthBuffer(ulx, uly, lrx, lry);
724
726
                        depthBuffer = dbCleared;
725
727
                } else