Skip to content

Commit

Permalink
sys_patch_dict: Remove Metal Downgrade for Intel
Browse files Browse the repository at this point in the history
Determined stock Metal is functional on Intel metal GPUs, XPC downgrade still required for 3802-based GPUs

Resolves Photos support for Intel GPUs

Requires removal of old patches to properly function
  • Loading branch information
khronokernel committed Sep 13, 2022
1 parent c064269 commit a5e002d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
28 changes: 24 additions & 4 deletions data/sys_patch_dict.py
Expand Up @@ -169,7 +169,31 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
},
},

# AMD GCN and Nvidia Kepler require Metal Downgrade in Ventura
# The patches are required due to struct issues in the Metal stack
# - AMD GCN will break on BronzeMtlDevice
# - See Nvidia Kepler patchset for more info
"Metal Common": {
"Display Name": "",
"OS Support": {
"Minimum OS Support": {
"OS Major": os_data.os_data.ventura,
"OS Minor": 0
},
"Maximum OS Support": {
"OS Major": os_data.os_data.max_os,
"OS Minor": 99
},
},
"Install": {
"/System/Library/Frameworks": {
"Metal.framework": "12.5",
"MetalPerformanceShaders.framework": "12.5",
},
},
},

"Miscellaneous Metal Common": {
"Display Name": "",
"OS Support": {
"Minimum OS Support": {
Expand All @@ -186,10 +210,6 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
"OpenCL.framework": "11.6",
# Ventura breaks with this patch
**({ "WebKit.framework": "11.6" } if os_major == os_data.os_data.monterey else {}),

# Ventura Metal patches
**({ "Metal.framework": "12.5" } if os_major >= os_data.os_data.ventura else {}),
**({ "MetalPerformanceShaders.framework": "12.5" } if os_major >= os_data.os_data.ventura else {}),
},
},
},
Expand Down
10 changes: 6 additions & 4 deletions resources/sys_patch_detect.py
Expand Up @@ -407,21 +407,21 @@ def generate_patchset(self, hardware_details):
required_patches.update({"High Sierra GVA": all_hardware_patchset["Graphics"]["High Sierra GVA"]})
required_patches.update({"Intel Sandy Bridge": all_hardware_patchset["Graphics"]["Intel Sandy Bridge"]})
if hardware_details["Graphics: Intel Ivy Bridge"] is True:
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
required_patches.update({"Miscellaneous Metal Common": all_hardware_patchset["Graphics"]["Miscellaneous Metal Common"]})
required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]})
required_patches.update({"Intel Ivy Bridge": all_hardware_patchset["Graphics"]["Intel Ivy Bridge"]})
if hardware_details["Graphics: Intel Haswell"] is True:
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
required_patches.update({"Miscellaneous Metal Common": all_hardware_patchset["Graphics"]["Miscellaneous Metal Common"]})
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"Intel Haswell": all_hardware_patchset["Graphics"]["Intel Haswell"]})
if hardware_details["Graphics: Intel Broadwell"] is True:
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
required_patches.update({"Miscellaneous Metal Common": all_hardware_patchset["Graphics"]["Miscellaneous Metal Common"]})
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"Intel Broadwell": all_hardware_patchset["Graphics"]["Intel Broadwell"]})
if hardware_details["Graphics: Intel Skylake"] is True:
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
required_patches.update({"Miscellaneous Metal Common": all_hardware_patchset["Graphics"]["Miscellaneous Metal Common"]})
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"Intel Skylake": all_hardware_patchset["Graphics"]["Intel Skylake"]})
if hardware_details["Graphics: Nvidia Tesla"] is True:
Expand All @@ -436,6 +436,7 @@ def generate_patchset(self, hardware_details):
if hardware_details["Graphics: Nvidia Kepler"] is True:
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
required_patches.update({"Miscellaneous Metal Common": all_hardware_patchset["Graphics"]["Miscellaneous Metal Common"]})
required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]})
required_patches.update({"Nvidia Kepler": all_hardware_patchset["Graphics"]["Nvidia Kepler"]})
for gpu in self.constants.computer.gpus:
Expand All @@ -460,6 +461,7 @@ def generate_patchset(self, hardware_details):
del(required_patches["AMD TeraScale 2"]["Install"]["/System/Library/Extensions"]["AMDRadeonX3000.kext"])
if hardware_details["Graphics: AMD Legacy GCN"] is True:
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
required_patches.update({"Miscellaneous Metal Common": all_hardware_patchset["Graphics"]["Miscellaneous Metal Common"]})
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"AMD Legacy GCN": all_hardware_patchset["Graphics"]["AMD Legacy GCN"]})
if hardware_details["Brightness: Legacy Backlight Control"] is True:
Expand Down

0 comments on commit a5e002d

Please sign in to comment.