When using XCode's Metal "Debug Shader" for a vertex shader for a simple rectangle (triangle strip with 4 vertices), the debugged vertex is different than the one selected.
- git clone this repository
- git clone git@github.com:peterwmwong/MetalDebugWrongVertexRepro.git
- Open project in XCode
- Update Project settings to assign team
- "Signing & Capabilities" -> "Signing" -> "Team"
- Build/Run application
- Metal Frame Capture 1 Frame
- Select "Debug Shader"
- Select "Vertex" tab
- Select Vertex 2
- Observe actual Vertex ID used by shader debugger (value bound to
vertex_id
)