GetSceneDepth gl_LastFragData[0].w

When I debuged shader on iPhoneXR, I found function CalcSceneDepth(in SceneTexturesCommon.h) return value gl_LastFragData[0].w。
So,
1.How SceneDepth is assigned to gl_LastFragData[0].w? Is Unreal doing this assignment in shader or graphic apis? Where I can find this assignment?
2.What’s the default value of gl_LastFragData[0].w?

Did you get anywhere with this?