patchsets: Avoid downgrading AppleGVA on AMD Polaris+ GPUs

This commit is contained in:
Mykola Grymalyuk
2024-09-23 09:45:56 -06:00
parent 192dfb79ae
commit 753cd6cf3f
4 changed files with 30 additions and 6 deletions
+2
View File
@@ -3,6 +3,8 @@
## 2.1.0 ## 2.1.0
- Fix Nvidia Kepler patches not installing on Monterey - Fix Nvidia Kepler patches not installing on Monterey
- Fix `iMac7,1` and `iMac8,1` failing to apply root patches on macOS Sequoia - Fix `iMac7,1` and `iMac8,1` failing to apply root patches on macOS Sequoia
- Avoid downgrading AppleGVA stack on AMD Polaris and Vega GPUs
- Thanks @ausdauersportler for the catch!
- Increment binaries: - Increment binaries:
- PatcherSupportPkg 1.8.2 - release - PatcherSupportPkg 1.8.2 - release
@@ -139,10 +139,9 @@ class AMDPolaris(BaseHardware):
**AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(), **AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
}) })
if self._is_gpu_architecture_present(gpu_architectures=[device_probe.Intel.Archs.Skylake]) is False: # Polaris and Vega GPUs still use the native GVA stack
# Monterey GVA is not required for Intel Skylake iGPUs _base.update({
_base.update({ **MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).revert_patches(),
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(), })
})
return _base return _base
@@ -122,7 +122,9 @@ class AMDVega(BaseHardware):
return {} return {}
return { return {
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(), # Polaris and Vega GPUs still use the native GVA stack
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).revert_patches(),
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(), **MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
**AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(), **AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
**self._model_specific_patches(), **self._model_specific_patches(),
@@ -39,4 +39,25 @@ class MontereyGVA(BaseSharedPatchSet):
}, },
}, },
}, },
}
def revert_patches(self) -> dict:
"""
Revert if patches are no longer required/misapplied
"""
if self._os_requires_patches() is False:
return {}
return {
"Revert Monterey GVA": {
PatchType.REMOVE_SYSTEM_VOLUME: {
"/System/Library/PrivateFrameworks/AppleGVA.framework/Versions/A": [
"AppleGVA"
],
"/System/Library/PrivateFrameworks/AppleGVACore.framework/Versions/A": [
"AppleGVACore"
],
}
}
} }