Because not all Windows devices provide good support for OpenCL and OpenGL hardware acceleration technologies, game developers often find it difficult for them to implement support for OpenGL games on Windows. To improve application compatibility, Coloradoa is developing common solutions to such problems. Specifically, it has partnered with Microsoft to build the OpenCL and OpenGL mapping layers.
With this approach, Collabora was able to bring OpenCL 1.2 and OpenGL 3.3 support to all enabled Windows and DirectX 12 devices.
GPU manufacturers can provide D3D12 drivers for their hardware and support DirectX, OpenCL, and OpenGL APIs, while Collabora’s work is divided into three parts:
An OpenCL compiler, an OpenCL runtime, and a Gallium driver that builds and executes command buffers on the GPU with the help of the D3D12 API.
Both components use the shared NIR-to-DXIL shader compiler, where NIR is the internal representation of Mesa to the GPU shader, and DXIL is Microsoft’s internal representation.
The D3D12 driver will use this method to convert those hardware-specific shaders, more details can be found on the Details page of The Introducing Open CL and OpenGL On DirectX in Collabora.