mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 11:30:15 +10:00
detect.py: Resolve Haswell + AMD GCN combo
This commit is contained in:
@@ -339,17 +339,21 @@ class HardwarePatchsetDetection:
|
|||||||
Notes:
|
Notes:
|
||||||
- Non-Metal GPUs are stripped out if any Metal GPUs are present
|
- Non-Metal GPUs are stripped out if any Metal GPUs are present
|
||||||
- Metal 3802 GPUs are stripped out if Metal 31001 GPUs are present on macOS Sequoia or newer
|
- Metal 3802 GPUs are stripped out if Metal 31001 GPUs are present on macOS Sequoia or newer
|
||||||
|
- Exception is made for "Graphics: AMD Legacy GCN" on Sequoia or newer
|
||||||
|
- Special handling is done in amd_legacy_gcn.py
|
||||||
"""
|
"""
|
||||||
non_metal_gpu_present = False
|
non_metal_gpu_present = False
|
||||||
metal_gpu_present = False
|
metal_gpu_present = False
|
||||||
metal_3802_gpu_present = False
|
metal_3802_gpu_present = False
|
||||||
metal_31001_gpu_present = False
|
metal_31001_gpu_present = False
|
||||||
|
metal_31001_name = None
|
||||||
|
|
||||||
for hardware in present_hardware:
|
for hardware in present_hardware:
|
||||||
hardware: BaseHardware
|
hardware: BaseHardware
|
||||||
sub_variant = hardware.hardware_variant_graphics_subclass()
|
sub_variant = hardware.hardware_variant_graphics_subclass()
|
||||||
if sub_variant == HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS:
|
if sub_variant == HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS:
|
||||||
metal_31001_gpu_present = True
|
metal_31001_gpu_present = True
|
||||||
|
metal_31001_name = hardware.name()
|
||||||
elif sub_variant == HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS:
|
elif sub_variant == HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS:
|
||||||
metal_3802_gpu_present = True
|
metal_3802_gpu_present = True
|
||||||
elif sub_variant == HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS:
|
elif sub_variant == HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS:
|
||||||
@@ -366,12 +370,13 @@ class HardwarePatchsetDetection:
|
|||||||
present_hardware.remove(hardware)
|
present_hardware.remove(hardware)
|
||||||
|
|
||||||
if metal_3802_gpu_present and metal_31001_gpu_present and self._xnu_major >= os_data.sequoia.value:
|
if metal_3802_gpu_present and metal_31001_gpu_present and self._xnu_major >= os_data.sequoia.value:
|
||||||
logging.error("Cannot mix Metal 3802 and Metal 31001 GPUs on macOS Sequoia or newer")
|
if metal_31001_name != "Graphics: AMD Legacy GCN":
|
||||||
logging.error("Stripping out Metal 3802 GPUs")
|
logging.error("Cannot mix Metal 3802 and Metal 31001 GPUs on macOS Sequoia or newer")
|
||||||
for hardware in list(present_hardware):
|
logging.error("Stripping out Metal 3802 GPUs")
|
||||||
if hardware.hardware_variant_graphics_subclass() == HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS:
|
for hardware in list(present_hardware):
|
||||||
logging.error(f" Stripping out {hardware.name()}")
|
if hardware.hardware_variant_graphics_subclass() == HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS:
|
||||||
present_hardware.remove(hardware)
|
logging.error(f" Stripping out {hardware.name()}")
|
||||||
|
present_hardware.remove(hardware)
|
||||||
|
|
||||||
return present_hardware
|
return present_hardware
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user