sys_patch: Add experimental 3802 patches

Not final, highly fragile patches
This commit is contained in:
Mykola Grymalyuk
2023-03-13 11:29:27 -06:00
parent ea80d41ff6
commit 0c68618ddf
4 changed files with 18 additions and 2 deletions

View File

@@ -311,7 +311,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
"OS Minor": 99
},
},
"Install Reference": {
"Install": {
"/System/Library/Frameworks": {
"Metal.framework": "13.2.1",
},

View File

@@ -13,7 +13,7 @@ class Constants:
def __init__(self):
# Patcher Versioning
self.patcher_version = "0.6.2" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version = "0.8.5" # PatcherSupportPkg
self.patcher_support_pkg_version = "0.8.6" # PatcherSupportPkg
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
self.discord_link = "https://discord.gg/rqdPgH8xSN"

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,

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:
@@ -759,6 +765,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"]})
@@ -767,6 +774,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"]})
@@ -797,6 +805,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"]})