Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 525c2c35 authored by ywen's avatar ywen Committed by Steve Kondik
Browse files

Fix stencil buffer bug.

Stencil test is enabled by setStencilFromClip(), but not disabled
in some use case, which causes some of the pixels are discarded by
mistake in draws followed. Disable stencil test when there is no
dirty clip.

CRs-Fixed: 539456

Change-Id: I318fb47212e49e2da89bcbfd161a1689ef91b02f
parent 67a46b2f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1765,6 +1765,12 @@ void OpenGLRenderer::setupDraw(bool clear) {
            setScissorFromClip();
            setScissorFromClip();
        }
        }
        setStencilFromClip();
        setStencilFromClip();
#ifdef QCOM_HARDWARE
    } else {
        // Disable stencil test in case setStencilFromClip()
        // enabled the stencil test but didn't disable it
        glDisable(GL_STENCIL_TEST);
#endif
    }
    }


    mDescription.reset();
    mDescription.reset();