Bug 111008

Summary: glClear requires GL_DEPTH_TEST enabled to clear depth buffer
Product: Mesa Reporter: nmr <nathan>
Component: GLXAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 18.3   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description nmr 2019-06-26 19:33:23 UTC
AFAICT with a 3.3 core profile context, glClear should clear the depth buffer regardless of the state of the depth test. 

From http://docs.gl/gl4/glClear:

"The pixel ownership test, the scissor test, dithering, and the buffer writemasks affect the operation of glClear. The scissor box bounds the cleared region. Alpha function, blend function, logical operation, stenciling, texture mapping, and depth-buffering are ignored by glClear." 

I see no mention of the depth test affecting glClear. And, according to Alfonse Reinhart in this discussion thread, the depth test should not affect clear: https://community.khronos.org/t/glclear/73899/4

Maybe I'm confused though, and disabling the depth test is somehow equivalent to disabling the depth write mask?

Mesa 18.3.6 DRM 3.27.0 Radeon RX Vega
Comment 1 nmr 2019-06-26 19:53:53 UTC
Looks like maybe I am just hallucinating bugs, I can no longer reproduce this :(
Comment 2 Ilia Mirkin 2019-06-26 19:55:28 UTC
If you can make this happen, it's definitely a bug. And bugs do happen, but I suspect the conditions have to be more subtle than a plain clear with nothing else around it.
Comment 3 GitLab Migration User 2019-09-18 17:46:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/119.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.