Xcode: need target property to set scheme value `Metal API Validation`
The option API Validation
is checked by default, even the release mode has a great impact on performance.
How about add XCODE_SCHEME_GPU_API_VALIDATION
?
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index e4329afc6c..91dc56b658 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -172,6 +172,10 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
WriteLaunchActionAttribute(xout, "enableUBSanitizer",
"XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER");
+ if(!Target->GetTarget()->GetPropertyAsBool("XCODE_SCHEME_GPU_API_VALIDATION")) {
+ xout.Attribute("enableGPUValidationMode", "1"); // "1" means disable, unset means `ON`
+ }
+
WriteLaunchActionAttribute(
xout, "stopOnEveryUBSanitizerIssue",
"XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP");
Fix: !7581 (merged)
Edited by PatriceJiang