Collabora & Microsoft to Bring OpenCL 1.2 and OpenGL 3.3 to DirectX 12 enabled Windows Devices

Collabora has been working on open-source graphics projects for a while, including Panfrost open-source drivers for Arm Midgard and Bitfrost GPUs which got experimental OpenGL ES 3.0 support earlier this year.

But the company has also been working with Microsoft in order to provide an OpenCL 1.2 & OpenGL 3.3 translation layer for Windows devices compatible with DirectX 12.

OpenCL DirectX Translation Layer
Diagram of the complete process for OpenCL translation – Click to Enlarge

Their solution relies on Mesa 3D OpenCL and OpenGL open-source implementation with three main components:

  • an OpenCL compiler using LLVM and the SPIRV-LLVM-Translator to generate SPIR-V representations of OpenCL kernels. The data goes through an SPIR-V to NIR translator (NIR is Mesa’s internal representation for GPU shaders), and finally to NIR-to-DXIL generating a DXIL compute shader and metadata understood by DirectX 12 (D3D12)
  • a custom OpenCL runtime to do a direct translation of DirectX 12 (Not based on Mesa Clover implementation)
  • a Gallium driver that builds and executes command-buffers on the GPU using the D3D12 API. It turns OpenGL commands into D3D12 command-buffers via the NIR to DXIL translator, which are executed on the GPU using the D3D12 driver.
wglgears OpenGL demo program for Windows – Click to Enlarge

This will allow hardware platform without full support for OpenGL or OpenCL to run apps using those graphics standard, and make it easier for developers looking to move from older OpenCL and OpenGL API versions to Direct X12.

The project is open-source with the code hosted on Gitlab, and eventually Collabora and Microsoft plan to upstream the source code to Mesa 3D graphics library.

More details can be found in separate announced on Collabora and Microsoft developer blogs.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

One Reply to “Collabora & Microsoft to Bring OpenCL 1.2 and OpenGL 3.3 to DirectX 12 enabled Windows Devices”

  1. They need this for Chromium/EDGE.
    Chromium use SKIA and SKIA use only opengl/vulkan.
    And also webgl is based on OpenGL so it is nice to have something that pass it trough DirectX drivers

    Most GPU drivers on windows has really bad opengl drivers and Intel is one of them 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC