Skip to content

Commit 70c4176

Browse files
[metal_31001] Update requirements for 31001
Only needed on devices with Intel iGPUs.
1 parent 5d07609 commit 70c4176

File tree

1 file changed

+24
-3
lines changed
  • opencore_legacy_patcher/sys_patch/patchsets/shared_patches

1 file changed

+24
-3
lines changed

opencore_legacy_patcher/sys_patch/patchsets/shared_patches/metal_31001.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,18 @@ def _patches_metal_31001_common(self) -> dict:
3131
if self._os_requires_patches() is False:
3232
return {}
3333

34+
# Currently no common patches; here for future-proofing.
35+
return {}
36+
37+
def _patches_metal_31001_metallibs(self) -> dict:
38+
"""
39+
Metallib patches for Metal 31001 GPUs
40+
"""
41+
if self._os_requires_patches() is False:
42+
return {}
43+
3444
return {
35-
"Metal 31001 Common": {
45+
"Metal 31001 Metallibs": {
3646
PatchType.OVERWRITE_SYSTEM_VOLUME: {
3747
"/System/Library/PrivateFrameworks/RenderBox.framework/Versions/A/Resources": {
3848
**({ "default.metallib": f"RenderBox-{self._xnu_major}" }),
@@ -41,10 +51,21 @@ def _patches_metal_31001_common(self) -> dict:
4151
}
4252
}
4353

54+
4455
def patches(self) -> dict:
4556
"""
4657
Dictionary of patches
4758
"""
48-
return {
59+
_base = {
4960
**self._patches_metal_31001_common(),
50-
}
61+
}
62+
63+
if self._is_gpu_architecture_present(
64+
[
65+
device_probe.Intel.Archs.Broadwell,
66+
device_probe.Intel.Archs.Skylake,
67+
]
68+
) is True:
69+
_base.update(self._patches_metal_31001_metallibs())
70+
71+
return _base

0 commit comments

Comments
 (0)