how to disable depth test but enable update depth texture(like glDepthMask(GL_TRUE)) in metal?

In OpenGL, we can disable the depth test and only update the depth buffer in the following ways:

glDisable(GL_DEPTH_TEST); 
glDepthMask(GL_TRUE);
glDisable(GL_DEPTH_TEST)
means all the fragments will "always pass".
glDepthMask(GL_TRUE)
means the depth buffer will be updated with the fragments depth value, whatever value it previously had.


In Metal, how to set it correctly?