docs: function _commitDepthStates(gl, cur, next) {
    // enable/disable depth-test
    if (cur.depthTest !== next.depthTest) {
      if (!next.depthTest) {
        gl.disable(gl.DEPTH_TEST);
        return;
      }
  
      gl.enable(gl.DEPTH_TEST);
      gl.depthFunc(next.depthFunc);
      gl.depthMask(next.depthWrite);
  
      return;
    }
  
    // commit depth-write
    if (cur.depthWrite !== next.depthWrite) {
      gl.depthMask(next.depthWrite);
    }
  
    // check if depth-write enabled
    if (next.depthTest === false) {
      if (next.depthWrite) {
        next.depthTest = true;
        next.depthFunc = enums.DS_FUNC_ALWAYS;
  
        gl.enable(gl.DEPTH_TEST);
        gl.depthFunc(next.depthFunc);
      }
  
      return;
    }
  
    // depth-func
    if (cur.depthFunc !== next.depthFunc) {
      gl.depthFunc(next.depthFunc);
    }
  }