Collabora working on making any DirectX 12 driver able to support open graphics and parallel programming APIs
- Reference: 1585140967
- News link: https://www.theregister.co.uk/2020/03/25/microsoft_and_collabora_developing_opencl/
- Source link:
DirectX is Microsoft's proprietary hardware-accelerated graphics API for Windows; OpenGL is a cross-platform graphics API; and OpenCL is a cross-platform framework for parallel programming on CPUs and GPUs. Although there are Windows OpenCL and OpenGL drivers for many GPUs, the extent of support varies, and the DirectX implementation may be better optimised. The mapping layers will be delivered as enhancements to the open-source [1]Mesa 3D project, for which Microsoft will provide a new DirectX 3D 12 (D3D12) backend.
Redmond [2]said the main purpose is to "improve support for OpenCL- and OpenGL-based productivity and creative apps where native drivers are not available" rather than for gaming applications.
Collabora's Erik Faye-Lund explained the project in more detail [3]here . "This means that a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs," said the graphics software dev. "This mapping layer is also expected to serve as a starting point in porting older OpenCL and OpenGL applications over to D3D12."
The versions supported will be OpenCL 1.2 and OpenGL 3.3.
Much of the work is about generating [4]DirectX Intermediate Language (DXIL), which is consumed by DirectX drivers. DXIL is based on [5]LLVM bitcode, but uses an ancient version for compatibility with older drivers. Unfortunately, newer versions of LLVM cannot generate bitcode in the older format, so the team has had to implement a new DXIL emitter, according to Faye-Lund.
[6]
The OpenCL compiler emits DirectX intermediate language
"This is just the announcement, and a whole lot of work is left to be done," said Lund.
The immediate goals are to pass conformance tests for OpenCL 1.2 and OpenGL 3.3, work on application compatibility with the focus on productivity applications, and to upstream the work to the main Mesa codebase. ®
[1] https://mesa3d.org/
[2] https://devblogs.microsoft.com/directx/in-the-works-opencl-and-opengl-mapping-layers-to-directx/
[3] https://www.collabora.com/news-and-blog/news-and-events/introducing-opencl-and-opengl-on-directx.html
[4] https://github.com/Microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst
[5] https://llvm.org/
[6] https://regmedia.co.uk/2020/03/25/opencl-compiler.jpg
This seems a bit worrying for Linux users. Unless I'm reading it wrong it sounds like this will give graphics card vendors incentive to not write OpenGL drivers for their cards at all. Making porting drivers to Linux even more effort and thus less likely to be done.
keep in mind that Android is ALSO linux-based, and has both x86 and ARM processors used by Android phones (as far as I'm aware, anyway). And, there is a bit of a technology race to provide those android phones with high resolution screens and whatnot. They'll most likely need OpenGL drivers for that. Good ones, too.
no worries. I think this may be ONE reason why MS is SUDDENLY INTERESTED in _FINALLY_ SUPPORTING OpenGL properly (see my earlier post)
back in the 90's when DirectX first became "a thing"
Back in the 90's when DirectX first became "a thing" I was at a windows-related conference and I asked their engineers about things _like_ OpenGL, and they're like "no no, don't use THAT... use DirectX because it will be OPTIMIZED!"
I didn't really make use of DX so much either. It was interesting but didn't do what I wanted, and I didn't need the blistering performance, and it looked like making use of it was WAY too bit fiddly for what I needed to do [business presentation graphics for analyzed data, basically].
HOWEVER - the whole idea of "Don't use THAT, use OUR PROPRIETARY SYSTEM" seems to have been VERY prevalent among MS's engineers, and that's how we got where we are today.
FINALLY some "love" (or desperation?) for OpenGL and OpenCL!!! I shall be more "open" to the idea of writing applications that dedicate their UI to this.
In FACT, is there a toolkit out there that targets OpenGL for a GUI? I've heard of such things being done, for proprietary systems, and I think "something out there" (maybe Qt or GTK) has an OPTION for this. But it would stand to reason that if OpenGL is to become universally supported with PROPER optimi9zation, that it could IN FACT be THE CROSS PLATFORM GUI API STANDARD we've been looking for???
"This means that a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs,"
Thereby eliminating OpenGL drivers and cutting out any platform except for Windows. Embrace, extend, extinguish.
Maybe but...
I never seen a bitcoin miner dependant on DirectX. for GPU support..
But if every device supports OpenGL and OpenCL
Why even bother with proprietary graphical / GPGPU chunks of DirectX? Just use Khronos specifications such as OpenGL, OpenCL and Vulkan and the other standards which exist for a reason.
Typical Microsoft
'We love open source' ....as long as it's running ontop of something you have to pay us to use.
Linux ontop of Windows with WSL
OpenGL and OpenCL ontop of DirectX
The Society for putting things ontop of other things, they've become.
Phoronix
I thought this was Phoronix for a second! I like this kind of coverage.