Posts

Post not yet marked as solved
1 Replies
414 Views
Some new features were release with metal2.0 . For example , I want to use MTLArguementBuffer in my project.The deployment target for my project is iOS10. There are some .metal files in my project, no compiler flag was set for these files. I want to create a new .metal file (file A) that compile with metal2.0(so I can use MTLArguementBuffer), so I set the compiler flag of file A to -std=ios-metal2.0 .The "Metal Language Revision" in "Build Settings" remain unchanged, which is "Use default for deployment target".When I run the App on an iOS13 device, it crashed with error "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'create MTLRenderPipelineState failed'".Then I change the "Metal Language Revision" to Metal2.0 , and ran it again on an iOS13 device, it works fine.My question is that , is setting some (not all) .metal files in the project to be compiled with a different metal language revision possible? What is the best practice of supporting new metal features in device with new iOS systems while keeping the app work in old systems(without new metal feature)?
Posted Last updated
.