gfx
gfx copied to clipboard
Metal shader debugging stopped working in XCode
It used to be the case where we'd do a GPU capture of a gfx-rs workload on Metal, and be able to deubg through the shaders. Now it complains with:

When building Metal examples, it's solved by enabling the source information here:

I checked the metallib tool options, and one sounds relevant:
--extract-source Extract contents of the SOURCES section from a MetalLib file
We'd want to make it include the source information in debug builds for all user shaders.
If building with the 'metal' command line tool, add the options '-gline-tables-only' and '-MO' to your compilation step.
I looked more at this, and concluded that there is no official mechanism to achieve this when going through newLibraryWithSource. Filed FB8247902 to Apple (and added to our list of bugs)...