This I admit is a peculiar sounding suggestion but I have use cases for it. The basic idea is this:
  • depth test is performed with gl_FragCoord.z, i.e. the depth value determined from rasterization
  • BUT the depth value written to the depth buffer is gl_FragDepth


Using this, one can have the depth test as GL_LESS, and yet after a draw, some values of the
depth buffer get larger. I admit that, again, this is odd, but I do have use cases.

Emulating this behavior with GL_ARB_shader_image_load_store by excessive use of memoryBarrier()
is a bad idea, just as what happens in trying to use it to emulate GL_EXT_shader_framebuffer_fetch of GLES land.