Skip to content

Instantly share code, notes, and snippets.

@Kichura
Last active March 19, 2024 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kichura/9fa44010d8ed9e5733d258292e327001 to your computer and use it in GitHub Desktop.
Save Kichura/9fa44010d8ed9e5733d258292e327001 to your computer and use it in GitHub Desktop.
OpenGL 3.3 and OpenCL 1.2 Compatibility Workaround

Windows:

  1. Verify your system is on Build 19041 or higher, (Can be checked upon by running winver from search)
  2. Get the Compatibility Pack from the Microsoft Store,
  3. Restart your system and attempt to run the application again.

(If this fails then check the alternative and read it's documentation, Environment variables from Linux are required in Windows' system variables list using sysdm.cpl)

Linux:

  1. Ensure your system is up-to-date and running latest mesa drivers,

  2. Open the /etc/environment file as root to start making changes to it using either vim, nano, etc,

  3. Add the following scripts to the file itself using the text editor:

    MESA_GL_VERSION_OVERRIDE=3.3COMPAT
    MESA_GLSL_VERSION_OVERRIDE=330
    CLOVER_PLATFORM_VERSION_OVERRIDE=1.2
    CLOVER_DEVICE_VERSION_OVERRIDE=1.2
    CLOVER_DEVICE_CLC_VERSION_OVERRIDE=1.2
    MESA_NO_ERROR=1

  4. Save the changes then restart your computer and attempt to run application again.

macOS:

Currently there is no workaround to adding OpenGL 3.3 support in software terms but if you use macOS 10.9 or higher then the following minimium GPUs will have OpenGL 3.3 support:

Intel = HD Graphics 3000, (and higher)
AMD = Radeon HD 2400, (and higher)
NVIDIA = GeForce 320. (and higher)

As for OpenCL, The following GPUs support OpenCL 1.2 out of the box:

Intel = HD Graphics 4400, (and higher)
AMD = Radeon HD 6230, (and higher)
NVIDIA = GeForce GT 630. (and higher)

If you happen to have an M1/M2 Mac device instead then Metal itself should be able to run applications at OpenGL 4.1 maxmium with Rosetta 2 being on OpenGL 2.1 instead.

Notes:

Note 1: This documentation should only be used if your machine does not ship with OpenGL 3.3 nor OpenCL 1.2 support in any way, If your machine does have support for both then this documentation is not required.

Note 2: OpenCL 1.2 workaround is included for Linux in case applications require that aswell, Specific mesa packages will need to be installed in case the system does not ship with them.

Note 3: By default, Older GPUs are not designed to be able to run applications that require the use of OpenGL 3.3 / OpenCL 1.2 - If the workaround is applied regardless then possible performance loss is to be expected. (However optimization tools can be tried if needed)

@Kichura
Copy link
Author

Kichura commented Mar 19, 2024

Additional note: The D3D12 driver supports OpenGL 4.6 as of November 15th, 2023, (Which was same day when i turned 22 years old)
which includes Vulkan 1.2 support at time of writing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment