Collabora has announced that it has partnered with Microsoft DirectX engineers to build OpenCL and OpenGL mapping layers, in order to bring OpenCL 1.2 and OpenGL 3.3 support to all Windows and DirectX 12 enabled devices.
According to the team, this work builds on a lot of previous work. First and foremost, it is building this by using Mesa 3D, with the Gallium interface as the base for the OpenGL layer, and NIR as the base for the OpenCL compiler. Collabora is also using LLVM and the SPIRV-LLVM-Translator from Khronos as the compiler front-end.
In addition, the team is taking advantage of Microsoft’s experience in creating their D3D12 Translation Layer. Moreover, it will take advantage of its own experience from developing Zink.
Mesa 3D is an open source implementation of several graphics technologies, including OpenCL and OpenGL. The OpenGL implementation in Mesa promises to be robust. It will also be used as the base for several industry-strength OpenGL drivers from multiple GPU vendors.
Among other things, Mesa consists of several API implementations (called state-trackers) as well as the Gallium low-level driver interface. It’s worth noting that the Gallium interface hides a lot of the legacy OpenGL details. It also translates OpenGL calls into something that looks more like modern GPU primitives.
Lastly, a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs. This mapping layer will also serve as a starting point in porting older OpenCL and OpenGL applications over to D3D12.
You can read more about this on Collabora’s website!