Metal: Non-uniform thread groups unsupported in Simulator? Is it?

My app is running Compute Shaders that use non-uniform thread groups.

When I run the app in the debugger with a simulator target the app crashes on encoder.dispatchThreads and the error message is:

Dispatch Threads with Non-Uniform Threadgroup Size is not supported on this device.

Previously the log output states that:

Metal Shader Validation is unsupported for Simulator.

However:

  • When I stop the debugger and just run the app in the simulator without the debugger attached, the app just runs fine and does not crash.
  • The SwiftUI Preview that also triggers the Compute Shader when preparing data also just runs fine without a crash.
  • I can run and debug on a real device no problem - I just don't have all sizes available.

Is there anything I need to check in my lldb/simulator configuration? It obviously does work, just the debugger cannot really deal with it?

Any input would be nice as this really slows my down as I have to be extremely careful when debugging on the simulator.

Partially Resolved: Once you switch off Metal API Validation it does not crash any more. (But it also does not validate Metal APIs any more...).

But what is the point in Metal API validation if it CRASHES the app because of non-existent issues? Is it a regular thing that you need to switch between Schemes when you switch from a physical device to the simulator?

Metal: Non-uniform thread groups unsupported in Simulator? Is it?
 
 
Q