MetalCompilerPlugin icon indicating copy to clipboard operation
MetalCompilerPlugin copied to clipboard

Does not work in the simulator

Open adarhef opened this issue 2 years ago • 3 comments

I'm able to run the plugin just fine and load the debug library, and it runs fine on an actual device. But in the simulator I get an error when attempting to debug a shader: "Target OS is incompatible: library was not compiled for the simulator"

Would be great if this could be controlled somehow, as I'd really like to use this plugin. The ability to debug shaders is fantastic, but I don't always have a device with me or it might be otherwise very inconvenient to pull one out.

If you could look into it I'd be eternally grateful!

adarhef avatar Dec 19 '23 16:12 adarhef

It's unlikely I'm going to be able to address this any time soon. I am happy to take pull requests though… Might be an easy fix?

schwa avatar Dec 19 '23 20:12 schwa

I think it might be easy yeah, if I can compile for more platforms at the same time. I'll look into it 👍🏼

adarhef avatar Dec 20 '23 05:12 adarhef

I tried adding -sdk iphonesimulator to the xcrun command, before the metal command, and it compiles fine but I'm still getting the same error that the library was not compiled for the simulator when attempting to debug a shader. Looking online didn't point me in a different direction, so I'm at a loss unfortunately.

adarhef avatar Dec 20 '23 08:12 adarhef