<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm" -->

---
title: Introducing OpenCL and OpenGL on DirectX | daily.dev
description: Collabora has announced a partnership with Microsoft DirectX engineers to build OpenCL and OpenGL mapping layers on top of DirectX 12. The goal is to bring...
canonical: https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Introducing OpenCL and OpenGL on DirectX | daily.dev
og:description: Collabora has announced a partnership with Microsoft DirectX engineers to build OpenCL and OpenGL mapping layers on top of DirectX 12. The goal is to bring...
og:url: https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm
og:image: https://api.daily.dev/og/posts/OdUmoi0gm.png
og:image:alt: Introducing OpenCL and OpenGL on DirectX
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introducing OpenCL and OpenGL on DirectX

**[Collabora Blog](https://daily.dev/sources/collabora)** · 6 min read · 0 upvotes · 0 comments

## Summary

Collabora has announced a partnership with Microsoft DirectX engineers to build OpenCL and OpenGL mapping layers on top of DirectX 12. The goal is to bring OpenCL 1.2 and OpenGL 3.3 support to all Windows devices with D3D12-capable hardware. The implementation is built on Mesa 3D, using the Gallium interface for OpenGL and NIR for the OpenCL compiler, with LLVM and the SPIRV-LLVM-Translator as the compiler front-end. A key technical challenge was generating DXIL (DirectX Intermediate Language) output — since LLVM is not forward-compatible, the team implemented a custom DXIL emitter. The work is split into three parts: an OpenCL compiler, an OpenCL runtime, and a D3D12 Gallium driver. The team plans to upstream the code into the main Mesa repository and aims to pass conformance tests for both target API versions.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/news-and-events/introducing-opencl-and-opengl-on-directx.html>

## Questions this post answers

### Why did the Mesa D3D12 OpenCL layer need a custom DXIL emitter instead of using the DirectX Shader Compiler or LLVM directly?

The DirectX Shader Compiler is a fork of LLVM 3.7, while the project uses LLVM 10.0 for the compiler front-end — linking two LLVM versions into one binary causes conflicts. LLVM itself cannot be used directly because it is not forward-compatible, meaning newer LLVM cannot produce bitcode readable by older versions. A custom DXIL emitter was built instead, handling LLVM's variable-width bitfield encoding.

_Graphics developers navigating LLVM version conflicts in driver toolchains find related deep-dives on daily.dev._

### What Mesa components are used in the OpenCL and OpenGL mapping layers for DirectX 12?

The OpenGL layer uses Mesa's Gallium interface, which abstracts legacy OpenGL details into modern GPU primitives. The OpenCL compiler uses NIR as its base, with LLVM 10.0 and the SPIRV-LLVM-Translator as the front-end. Both layers share a NIR-to-DXIL shader compiler. The OpenCL pipeline goes: LLVM → SPIR-V → NIR → DXIL compute shader, executed via D3D12.

_Developers working on Mesa driver contributions track upstream changes like these on daily.dev._

## Similar posts on daily.dev

- [DirectX Support Promoted To Official Target Within LLVM](https://daily.dev/posts/directx-support-promoted-to-official-target-within-llvm-bsk4fpohj) · Phoronix · 0 upvotes · 0 comments
- [AMD and Microsoft partner on DirectX ML, DirectStorage, and developer tools at GDC 2026](https://daily.dev/posts/amd-and-microsoft-partner-on-directx-ml-directstorage-and-developer-tools-at-gdc-2026-kwpmev8jr) · AMD GPUOpen · 0 upvotes · 0 comments
- [Cracking Windows Open: Porting RADV to WIN32](https://daily.dev/posts/cracking-windows-open-porting-radv-to-win32-f2n59xdec) · Hacker News · 0 upvotes · 0 comments
- [Microsoft Updates DirectX Shader Compiler With Improved Vulkan Driver Interoperability](https://daily.dev/posts/microsoft-updates-directx-shader-compiler-with-improved-vulkan-driver-interoperability-ztxfrpbxj) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#graphics-programming](https://daily.dev/tags/graphics-programming), [#opencl](https://daily.dev/tags/opencl)

[View this post on daily.dev](https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Introducing OpenCL and OpenGL on DirectX","url":"https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm"},"datePublished":"2026-08-11T08:54:13.074Z","dateModified":"2026-08-11T09:19:43.647Z","description":"Collabora has announced a partnership with Microsoft DirectX engineers to build OpenCL and OpenGL mapping layers on top of DirectX 12. The goal is to bring...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1a6b5f2f7ef880690c4ad04a6cc3e570?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1a6b5f2f7ef880690c4ad04a6cc3e570?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"graphics-programming,opencl","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Introducing OpenCL and OpenGL on DirectX"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/introducing-opencl-and-opengl-on-directx-odumoi0gm#faq","mainEntity":[{"@type":"Question","name":"Why did the Mesa D3D12 OpenCL layer need a custom DXIL emitter instead of using the DirectX Shader Compiler or LLVM directly?","acceptedAnswer":{"@type":"Answer","text":"The DirectX Shader Compiler is a fork of LLVM 3.7, while the project uses LLVM 10.0 for the compiler front-end — linking two LLVM versions into one binary causes conflicts. LLVM itself cannot be used directly because it is not forward-compatible, meaning newer LLVM cannot produce bitcode readable by older versions. A custom DXIL emitter was built instead, handling LLVM's variable-width bitfield encoding. Graphics developers navigating LLVM version conflicts in driver toolchains find related deep-dives on daily.dev."}},{"@type":"Question","name":"What Mesa components are used in the OpenCL and OpenGL mapping layers for DirectX 12?","acceptedAnswer":{"@type":"Answer","text":"The OpenGL layer uses Mesa's Gallium interface, which abstracts legacy OpenGL details into modern GPU primitives. The OpenCL compiler uses NIR as its base, with LLVM 10.0 and the SPIRV-LLVM-Translator as the front-end. Both layers share a NIR-to-DXIL shader compiler. The OpenCL pipeline goes: LLVM → SPIR-V → NIR → DXIL compute shader, executed via D3D12. Developers working on Mesa driver contributions track upstream changes like these on daily.dev."}}]}
```

