Use gstate.zmsk & 1 for depthMask