Skip to content

Commit

Permalink
Avoid patching Metal and non-metal together
Browse files Browse the repository at this point in the history
  • Loading branch information
khronokernel committed Sep 23, 2021
1 parent 49fa20e commit e31519a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Resources/SysPatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self, model, versions):
self.bad_board_id = False
self.no_patch = True
self.validate = False
self.supports_metal = False

# if (Path.home() / "Desktop/OCLP-Test/").exists:
# self.mount_location = Path.home() / "Desktop/OCLP-Test"
Expand Down Expand Up @@ -625,6 +626,7 @@ def detect_gpus(self):
if self.constants.detected_os == self.constants.monterey and self.constants.detected_os_minor > 0:
if "21A5506j" not in self.constants.detected_os_build:
self.kepler_gpu = True
self.supports_metal = True
elif gpu.arch == device_probe.AMD.Archs.TeraScale_1:
if self.constants.detected_os > non_metal_os:
self.amd_ts1 = True
Expand All @@ -645,7 +647,16 @@ def detect_gpus(self):
elif gpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
if self.constants.detected_os > self.constants.big_sur:
self.ivy_gpu = True
self.supports_metal = True
i += 1
if self.supports_metal is True:
# Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU
# Main concerns are for iMac12,x with Sandy iGPU and Kepler dGPU
self.nvidia_legacy = False
self.amd_ts1 = False
self.amd_ts2 = False
self.iron_gpu = False
self.sandy_gpu = False


def detect_patch_set(self):
Expand Down

0 comments on commit e31519a

Please sign in to comment.