How OCLP-Mod OpenCL and GVA Patches Work Together for macOS Monterey Compatibility
OCLP-Mod bundles Monterey OpenCL and GVA patches together to restore both GPU compute and hardware-accelerated video decoding for legacy graphics cards on macOS Ventura and later.
OCLP-Mod is an open-source patching framework that restores functionality Apple removed in macOS Monterey for unsupported hardware. When running macOS Ventura or newer, the framework applies complementary patchsets to re-enable critical graphics frameworks that legacy GPUs require for full functionality.
What the Monterey OpenCL and GVA Patches Restore
OCLP-Mod addresses Apple’s removal of legacy GPU support by reinstalling two distinct framework sets that operate as a unified recovery solution.
Monterey OpenCL Framework Restoration
The Monterey OpenCL patchset reinstalls OpenCL.framework version 12.5 to restore compute capabilities for legacy GPUs. According to the source code in oclp_mod/sys_patch/patchsets/shared_patches/monterey_opencl.py, this patch applies only when the running kernel version is Ventura (13.x) or newer, as determined by the _os_requires_patches guard checking self._xnu_major >= os_data.ventura.value.
Monterey GVA Framework Restoration
The Monterey GVA patchset restores AppleGVA.framework and AppleGVACore.framework (both version 12.5) to re-enable DRM support and hardware-accelerated video decode/encode. As implemented in oclp_mod/sys_patch/patchsets/shared_patches/monterey_gva.py, this patch uses the identical OS version guard as the OpenCL patch, ensuring simultaneous application on Ventura and later systems.
Why the Patches Are Interdependent
The OpenCL and GVA patches are technically separate but functionally inseparable for complete graphics restoration.
GVA Dependency on OpenCL
Apple’s GVA stack utilizes OpenCL for DRM-related tasks and secure video path operations. Without a functional OpenCL runtime, the GVA restore cannot provide full video-decoding and DRM support. The docs/PATCHEXPLAIN.md documentation explicitly links these frameworks, stating that AppleGVA/AppleGVACore entries "Enable DRM support" while the OpenCL entry for Ivy Bridge explains "Re-add Ivy Bridge hardware acceleration support."
Hardware Pipeline Requirements
Many older Intel and AMD GPUs rely on OpenCL as a compute backend for GVA-based video pipelines. Restoring OpenCL alone provides compute capabilities but leaves video-related DRM broken; restoring GVA alone leaves the video pipeline without the compute helpers it expects. Consequently, OCLP-Mod always bundles both patches when targeting GPUs dropped in Monterey.
Implementation in Hardware Patchsets
Hardware-specific patchsets merge both patch dictionaries to ensure simultaneous application. In oclp_mod/sys_patch/patchsets/hardware/graphics/intel_ivy_bridge.py, the patches() method imports both classes and merges their outputs:
from ...shared_patches.monterey_opencl import MontereyOpenCL
from ...shared_patches.monterey_gva import MontereyGVA
def patches(self) -> dict:
if self.native_os() is True:
return {}
return {
**LegacyMetal3802(...).patches(),
**BigSurGVA(...).patches(),
**MontereyOpenCL(...).patches(),
**BigSurOpenCL(...).patches(),
**MontereyGVA(...).patches(), # <-- GVA restore
**MontereyWebKit(...).patches(),
**self._model_specific_patches(),
}
This pattern appears throughout the hardware directory (including intel_sandy_bridge.py, amd_vega.py, and amd_polaris.py), guaranteeing that both frameworks are present together.
Detecting Patch Requirements Programmatically
You can verify whether your system requires these patches by checking the OS version guards directly:
from oclp_mod.sys_patch.patchsets.shared_patches.monterey_opencl import MontereyOpenCL
from oclp_mod.sys_patch.patchsets.shared_patches.monterey_gva import MontereyGVA
from oclp_mod.datasets.os_data import os_data
# Example: running on Ventura (13.x)
xnu_major = 22 # Ventura's XNU major version
xnu_minor = 0
marketing = "Ventura"
ocl_patch = MontereyOpenCL(xnu_major, xnu_minor, marketing)
gva_patch = MontereyGVA(xnu_major, xnu_minor, marketing)
print("OpenCL needed:", ocl_patch._os_requires_patches()) # → True
print("GVA needed:", gva_patch._os_requires_patches()) # → True
The resulting patch dictionaries contain the specific framework versions to be merged:
patches = {
**MontereyOpenCL(xnu_major, xnu_minor, marketing).patches(),
**MontereyGVA (xnu_major, xnu_minor, marketing).patches(),
}
This generates merge instructions targeting /System/Library/Frameworks/OpenCL.framework and /System/Library/PrivateFrameworks/AppleGVA.framework with version 12.5 binaries.
Summary
- Dual Framework Restoration: OCLP-Mod restores both
OpenCL.frameworkandAppleGVA.framework(version 12.5) to recover full graphics functionality on modern macOS releases. - Conditional Application: Both patches apply only on macOS Ventura (13.x) and later, guarded by
_os_requires_patcheschecks in their respective Python modules. - Functional Interdependency: GVA requires OpenCL for DRM and secure video processing; neither framework functions completely in isolation on legacy hardware.
- Unified Delivery: Hardware patchsets in
oclp_mod/sys_patch/patchsets/hardware/graphics/merge both patch dictionaries using the**operator to ensure simultaneous installation.
Frequently Asked Questions
What macOS versions require the Monterey OpenCL and GVA patches?
macOS Ventura (13.x) and newer require these patches when running on hardware that Apple dropped support for in Monterey. The patches are unnecessary on Monterey itself because the frameworks remain native to that release. The _os_requires_patches method in both monterey_opencl.py and monterey_gva.py explicitly checks for xnu_major >= os_data.ventura.value.
Why doesn't GVA work without OpenCL on patched systems?
Apple’s Graphics and Video Acceleration (GVA) framework delegates certain DRM-related computations and secure video path operations to OpenCL. When OCLP-Mod restores GVA without OpenCL, the video pipeline lacks the compute backend necessary for hardware-accelerated decoding and DRM playback. The documentation in docs/PATCHEXPLAIN.md confirms that these frameworks work together to provide "DRM support" and "hardware acceleration support."
Which hardware benefits from both patchsets?
Legacy GPUs abandoned in Monterey—including Intel Ivy Bridge and Sandy Bridge integrated graphics, plus AMD Polaris and Vega discrete cards—require both patchsets. The hardware-specific patchsets in oclp_mod/sys_patch/patchsets/hardware/graphics/ automatically bundle OpenCL and GVA patches for these architectures, ensuring complete graphics and video functionality restoration.
How can I verify the patches are applied correctly?
After running OCLP-Mod, check that /System/Library/Frameworks/OpenCL.framework and /System/Library/PrivateFrameworks/AppleGVA.framework contain version 12.5 binaries. You can also verify patch dictionary merging by inspecting the OCLP-Mod logs, which record the combined patchsets loaded from hardware-specific classes like IntelIvyBridge or AMD Vega.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →