OpenCLOn12
OpenCLOn12 is a mapping layer, which implements the OpenCL 1.2 API on top of D3D12. It also implements the OpenCL ICD extension, and can therefore be loaded by the existing ICD loader.
This repository contains the implementations of the APIs. It depends on various other repositories for further functionality, either implicitly or explicitly:
- WIL is used occasionally throughout.
- The OpenCL headers are referenced.
- GoogleTest is used for unit testing.
- The D3D12TranslationLayer handles some of the complexity of using D3D12 for us.
- The compiler infrastructure for consuming OpenCL C and SPIR-V and converting to DXIL comes from the Mesa project. This dependency is only required at runtime, as a copy of the compiler interface header is contained in this repo. The compiler interface in the
master branch of this repository tracks master of Mesa.
- The compiler was originally developed downstream from
master, and the downstream-abi branch of this repository is intended to interface with that downstream interface.
Additionally, DXIL.dll from the Windows SDK will be required at runtime to sign and validate the DXIL shaders produced by the compiler.
Generally, OpenCLOn12 when installed through the Releases pages' Universal_D3DMappingLayers_(...).appx is the same app as the "OpenCL™, OpenGL®, and Vulkan® Compatibility Pack" app on Microsoft Store.
For more details about OpenCLOn12, see:
Make sure that you visit the DirectX Landing Page for more resources for DirectX developers.
Current Status
At this point, the OpenCL 1.2 API is fully implemented, with no optional extensions. It has not yet been certified conformant, though it passes every conformance test for OpenCL 1.2, but has not yet passed all tests on a single underlying implementation.