Merge pull request #1034 from dortania/3802-experiment

sys_patch: Add experimental Metal patches for 3802-based GPUs
This commit is contained in:
Mykola Grymalyuk
2023-03-23 11:18:46 -06:00
committed by GitHub
4 changed files with 18 additions and 3 deletions
+1 -2
View File
@@ -348,7 +348,6 @@ class SystemPatchDictionary():
# Support for 3802 GPUs were broken with 13.3+
# Downgrades 31001 stack to 13.2.1, however nukes AMFI support
# Extremely fugly, only for reference purposes at this time
"Metal 3802 Common Extended": {
"Display Name": "",
"OS Support": {
@@ -361,7 +360,7 @@ class SystemPatchDictionary():
"OS Minor": 99
},
},
"Install Reference": {
"Install": {
"/System/Library/Frameworks": {
"Metal.framework": "13.2.1",
},
+1 -1
View File
@@ -13,7 +13,7 @@ class Constants:
def __init__(self) -> None:
# Patcher Versioning
self.patcher_version: str = "0.6.2" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version: str = "0.8.5" # PatcherSupportPkg
self.patcher_support_pkg_version: str = "0.8.6" # PatcherSupportPkg
self.copyright_date: str = "Copyright © 2020-2023 Dortania"
# URLs
+7
View File
@@ -245,6 +245,13 @@ class GenerateDefaults:
device_probe.AMD.Archs.Vega,
device_probe.AMD.Archs.Navi,
]:
if gpu in [
device_probe.Intel.Archs.Ivy_Bridge,
device_probe.Intel.Archs.Haswell,
device_probe.NVIDIA.Archs.Kepler,
]:
self.constants.disable_amfi = True
if gpu in [
device_probe.AMD.Archs.Legacy_GCN_7000,
device_probe.AMD.Archs.Legacy_GCN_8000,
+9
View File
@@ -120,6 +120,8 @@ class DetectRootPatch:
self.supports_metal = True
if self.constants.detected_os >= os_data.os_data.ventura:
self.amfi_must_disable = True
if (self.constants.detected_os == os_data.os_data.ventura and self.constants.detected_os_minor >= 4) or self.constants.detected_os > os_data.os_data.ventura:
self.amfi_shim_bins = True
elif gpu.arch in [
device_probe.NVIDIA.Archs.Fermi,
device_probe.NVIDIA.Archs.Kepler,
@@ -205,11 +207,15 @@ class DetectRootPatch:
self.ivy_gpu = True
if self.constants.detected_os >= os_data.os_data.ventura:
self.amfi_must_disable = True
if (self.constants.detected_os == os_data.os_data.ventura and self.constants.detected_os_minor >= 4) or self.constants.detected_os > os_data.os_data.ventura:
self.amfi_shim_bins = True
self.supports_metal = True
elif gpu.arch == device_probe.Intel.Archs.Haswell:
if self.constants.detected_os > os_data.os_data.monterey:
self.haswell_gpu = True
self.amfi_must_disable = True
if (self.constants.detected_os == os_data.os_data.ventura and self.constants.detected_os_minor >= 4) or self.constants.detected_os > os_data.os_data.ventura:
self.amfi_shim_bins = True
self.supports_metal = True
elif gpu.arch == device_probe.Intel.Archs.Broadwell:
if self.constants.detected_os > os_data.os_data.monterey:
@@ -761,6 +767,7 @@ class DetectRootPatch:
if hardware_details["Graphics: Intel Ivy Bridge"] is True:
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
required_patches.update({"Metal 3802 Common Extended": all_hardware_patchset["Graphics"]["Metal 3802 Common Extended"]})
required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]})
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
@@ -769,6 +776,7 @@ class DetectRootPatch:
if hardware_details["Graphics: Intel Haswell"] is True:
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
required_patches.update({"Metal 3802 Common Extended": all_hardware_patchset["Graphics"]["Metal 3802 Common Extended"]})
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
required_patches.update({"Intel Haswell": all_hardware_patchset["Graphics"]["Intel Haswell"]})
@@ -799,6 +807,7 @@ class DetectRootPatch:
if hardware_details["Graphics: Nvidia Kepler"] is True:
required_patches.update({"Revert Metal Downgrade": all_hardware_patchset["Graphics"]["Revert Metal Downgrade"]})
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
required_patches.update({"Metal 3802 Common Extended": all_hardware_patchset["Graphics"]["Metal 3802 Common Extended"]})
required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]})
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})