Bug 111008 - glClear requires GL_DEPTH_TEST enabled to clear depth buffer
Summary: glClear requires GL_DEPTH_TEST enabled to clear depth buffer
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: 18.3
Hardware: Other Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-26 19:33 UTC by nmr
Modified: 2019-09-18 17:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.