mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
adding support for enableGPUValidationMode (#1294)
* adding support for enableGPUValidationMode * encode enableGPUValidationMode in Scheme.Run.toJSONValue() * ci: commit fixtures changes * docs: Add changelog for enableGPUValidationMode update Doc ProjectSpec.md * docs: update ProjectSpec.md for enableGPUValidationMode default value --------- Co-authored-by: wanglulu <louiswang@lilith.com>
This commit is contained in:
parent
372f20fe5a
commit
f33d600d50
@ -933,6 +933,7 @@ The different actions share some properties:
|
||||
- [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action
|
||||
- [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - `run`, `test` and `profile` actions can define the environment variables. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled.
|
||||
- [ ] **enableGPUFrameCaptureMode**: **GPUFrameCaptureMode** - Property value set for `GPU Frame Capture`. Possible values are `autoEnabled`, `metal`, `openGL`, `disabled`. Default is `autoEnabled`.
|
||||
- [ ] **enableGPUValidationMode**: **GPUValidationMode** - Property value set for `Metal API Validation`. Possible values are `enabled`, `disabled`, `extended`. Default is `enabled`.
|
||||
- [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that this scheme should disable the Main Thread Checker. This defaults to false
|
||||
- [ ] **stopOnEveryMainThreadCheckerIssue**: **Bool** - a boolean that indicates if this scheme should stop at every Main Thread Checker issue. This defaults to false
|
||||
- [ ] **language**: **String** - `run` and `test` actions can define a language that is used for Application Language
|
||||
|
@ -135,6 +135,7 @@ public struct Scheme: Equatable {
|
||||
public var postActions: [ExecutionAction]
|
||||
public var environmentVariables: [XCScheme.EnvironmentVariable]
|
||||
public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode
|
||||
public var enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode
|
||||
public var disableMainThreadChecker: Bool
|
||||
public var stopOnEveryMainThreadCheckerIssue: Bool
|
||||
public var language: String?
|
||||
@ -156,6 +157,7 @@ public struct Scheme: Equatable {
|
||||
postActions: [ExecutionAction] = [],
|
||||
environmentVariables: [XCScheme.EnvironmentVariable] = [],
|
||||
enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode,
|
||||
enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.enabled,
|
||||
disableMainThreadChecker: Bool = disableMainThreadCheckerDefault,
|
||||
stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault,
|
||||
language: String? = nil,
|
||||
@ -175,6 +177,7 @@ public struct Scheme: Equatable {
|
||||
self.environmentVariables = environmentVariables
|
||||
self.disableMainThreadChecker = disableMainThreadChecker
|
||||
self.enableGPUFrameCaptureMode = enableGPUFrameCaptureMode
|
||||
self.enableGPUValidationMode = enableGPUValidationMode
|
||||
self.stopOnEveryMainThreadCheckerIssue = stopOnEveryMainThreadCheckerIssue
|
||||
self.language = language
|
||||
self.region = region
|
||||
@ -470,6 +473,11 @@ extension Scheme.Run: JSONObjectConvertible {
|
||||
} else {
|
||||
enableGPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode
|
||||
}
|
||||
if let gpuValidationMode: String = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") {
|
||||
enableGPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.fromJSONValue(gpuValidationMode)
|
||||
} else {
|
||||
enableGPUValidationMode = XCScheme.LaunchAction.defaultGPUValidationMode
|
||||
}
|
||||
disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault
|
||||
stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault
|
||||
language = jsonDictionary.json(atKeyPath: "language")
|
||||
@ -514,6 +522,10 @@ extension Scheme.Run: JSONEncodable {
|
||||
if enableGPUFrameCaptureMode != XCScheme.LaunchAction.defaultGPUFrameCaptureMode {
|
||||
dict["enableGPUFrameCaptureMode"] = enableGPUFrameCaptureMode.toJSONValue()
|
||||
}
|
||||
|
||||
if enableGPUValidationMode != XCScheme.LaunchAction.defaultGPUValidationMode {
|
||||
dict["enableGPUValidationMode"] = enableGPUValidationMode.toJSONValue()
|
||||
}
|
||||
|
||||
if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault {
|
||||
dict["disableMainThreadChecker"] = disableMainThreadChecker
|
||||
@ -962,3 +974,29 @@ extension XCScheme.LaunchAction.GPUFrameCaptureMode: JSONEncodable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension XCScheme.LaunchAction.GPUValidationMode: JSONEncodable {
|
||||
public func toJSONValue() -> Any {
|
||||
switch self {
|
||||
case .enabled:
|
||||
return "enabled"
|
||||
case .disabled:
|
||||
return "disabled"
|
||||
case .extended:
|
||||
return "extended"
|
||||
}
|
||||
}
|
||||
|
||||
static func fromJSONValue(_ string: String) -> XCScheme.LaunchAction.GPUValidationMode {
|
||||
switch string {
|
||||
case "enabled":
|
||||
return .enabled
|
||||
case "disabled":
|
||||
return .disabled
|
||||
case "extended":
|
||||
return .extended
|
||||
default:
|
||||
fatalError("Invalid enableGPUValidationMode value. Valid values are: enable, disable, extended")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -341,6 +341,7 @@ public class SchemeGenerator {
|
||||
allowLocationSimulation: allowLocationSimulation,
|
||||
locationScenarioReference: locationScenarioReference,
|
||||
enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode,
|
||||
enableGPUValidationMode: scheme.run?.enableGPUValidationMode ?? XCScheme.LaunchAction.defaultGPUValidationMode,
|
||||
disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault,
|
||||
stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault,
|
||||
commandlineArguments: launchCommandLineArgs,
|
||||
|
@ -88,6 +88,7 @@
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
enableGPUFrameCaptureMode = "3"
|
||||
enableGPUValidationMode = "1"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
@ -478,6 +478,7 @@ schemes:
|
||||
defaultLocation: Honolulu, HI, USA
|
||||
customLLDBInit: ${SRCROOT}/.lldbinit
|
||||
enableGPUFrameCaptureMode: "disabled"
|
||||
enableGPUValidationMode: "disabled"
|
||||
storeKitConfiguration: "App_iOS/Configuration.storekit"
|
||||
macroExpansion: App_iOS
|
||||
test:
|
||||
|
Loading…
Reference in New Issue
Block a user