Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

Commit

Permalink
Add RX 5700 and RX 5700XT AMD GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavo-IM committed Oct 20, 2019
1 parent e1a15f8 commit 0f8c16e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions AGPMInjector/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class ViewController: NSViewController {
addItemsToAmdArray(item: "ProDuo")
addItemsToAmdArray(item: "W7100")
addItemsToAmdArray(item: "W9100")
addItemsToAmdArray(item: "RX5700XT")

// Add Nvidia GPUs
addItemsToNvidiaArray(item: "GTX650")
Expand Down Expand Up @@ -304,6 +305,19 @@ class ViewController: NSViewController {
let setID = -1
if AMDCheck.state == NSControl.StateValue.on {
NvidiaMenu.state = NSControl.StateValue.off
if AMDMenu.titleOfSelectedItem == "RX5700XT" {
let plistToEncode = setPlist(buildMachineOSBuild: plistData.buildMachineOSBuild, cfBundleDevelopmentRegion: plistData.cfBundleDevelopmentRegion, cfBundleGetInfoString: plistData.cfBundleGetInfoString, cfBundleIdentifier: plistData.cfBundleIdentifier, cfBundleInfoDictionaryVersion: plistData.cfBundleInfoDictionaryVersion, cfBundleName: plistData.cfBundleName, cfBundlePackageType: plistData.cfBundlePackageType, cfBundleShortVersionString: plistData.cfBundleShortVersionString, cfBundleSignature: plistData.cfBundleSignature, cfBundleVersion: plistData.cfBundleVersion, nsHumanReadableCopyright: plistData.nsHumanReadableCopyright, setIOKitPersonalities: setIOKitPersonalities(setAGPM: setAGPM(cfBundleIdentifier: plistData.IOKitPersonalities.AGPM.cfBundleIdentifier, ioClass: plistData.IOKitPersonalities.AGPM.ioClass, ioNameMatch: plistData.IOKitPersonalities.AGPM.ioNameMatch, ioProviderClass: plistData.IOKitPersonalities.AGPM.ioProviderClass, setMachines: setMachines(machine: setMachine(machinetype: setMachine.MachineType(rawValue: machineSelected.titleOfSelectedItem!)!, setGPUs: setGpu(gpu: .RX5700XT, agdcEnabled: AgdcEnabled, setHeuristic: setHeuristic(setID: setID), controlID: controlID, maxPowerState: maxPState, minPowerState: miniPState))))), osBundleRequired: plistData.osBundleRequired)
do {
try FileManager.default.createDirectory(atPath: filePath.path, withIntermediateDirectories: true, attributes: nil)
let InfoPlistfilePath = filePath.appendingPathComponent("\(setInfoPlistName)")
let data = try plistEncoder.encode(plistToEncode)
try data.write(to: InfoPlistfilePath)
saveAlert()
}
catch {
print(error.localizedDescription)
}
}
if AMDMenu.titleOfSelectedItem == "RadeonVII" {
let plistToEncode = setPlist(buildMachineOSBuild: plistData.buildMachineOSBuild, cfBundleDevelopmentRegion: plistData.cfBundleDevelopmentRegion, cfBundleGetInfoString: plistData.cfBundleGetInfoString, cfBundleIdentifier: plistData.cfBundleIdentifier, cfBundleInfoDictionaryVersion: plistData.cfBundleInfoDictionaryVersion, cfBundleName: plistData.cfBundleName, cfBundlePackageType: plistData.cfBundlePackageType, cfBundleShortVersionString: plistData.cfBundleShortVersionString, cfBundleSignature: plistData.cfBundleSignature, cfBundleVersion: plistData.cfBundleVersion, nsHumanReadableCopyright: plistData.nsHumanReadableCopyright, setIOKitPersonalities: setIOKitPersonalities(setAGPM: setAGPM(cfBundleIdentifier: plistData.IOKitPersonalities.AGPM.cfBundleIdentifier, ioClass: plistData.IOKitPersonalities.AGPM.ioClass, ioNameMatch: plistData.IOKitPersonalities.AGPM.ioNameMatch, ioProviderClass: plistData.IOKitPersonalities.AGPM.ioProviderClass, setMachines: setMachines(machine: setMachine(machinetype: setMachine.MachineType(rawValue: machineSelected.titleOfSelectedItem!)!, setGPUs: setGpu(gpu: .RadeonVII, agdcEnabled: AgdcEnabled, setHeuristic: setHeuristic(setID: setID), controlID: controlID, maxPowerState: maxPState, minPowerState: miniPState))))), osBundleRequired: plistData.osBundleRequired)
do {
Expand Down
1 change: 1 addition & 0 deletions AGPMInjector/setPlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ struct setGpu: Encodable {
case ProDuo = "Vendor1002Device67c4"
case W7100 = "Vendor1002Device692b"
case W9100 = "Vendor1002Device67a0"
case RX5700XT = "Vendor1002Device731f"
case GTX650 = "Vendor10deDevice8428"
case GTX650Ti = "Vendor10deDevice11c6"
case GTX650TIBoost = "Vendor10deDevice11c2"
Expand Down

0 comments on commit 0f8c16e

Please sign in to comment.