A very interesting use of open source in action here from the incredibly smart team over at Collabora who teamed up with Microsoft engineers to get OpenGL and OpenCL via DirectX.
Why is this interesting? Well, they're doing it by using the open source Mesa drivers. It's pretty darn clever, and shows just how far translation layers are being used industry-wide. Once this is all implemented, it means that any device that supports DirectX 12 would also work with (and actually be compliant) with OpenGL 3.3 and OpenCL 1.2.
Not all Windows-powered devices have consistent support for hardware-accelerated OpenCL and OpenGL. So in order to improve application compatibility, we are building a generic solution to the problem. This means that a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs.
This mapping layer is also expected to serve as a starting point in porting older OpenCL and OpenGL applications over to D3D12.
In addition, we believe this is good for the wider open source community. A lot of the problems we are solving here are shared with other drivers and translation layers, and we hope that the code will be useful beyond the use cases listed above.
Collabora
It's not finished yet, plenty of work is still to be done but you can find the source code online now and they are planning to upstream the work to the main Mesa project.
Speaking to Collabora today over email to get something cleared up, I asked them if this actually meant that if a developer made an OpenGL game, that on Windows they could keep it as OpenGL but it would run through DirectX 12 in the driver without the developer needing to do anything. Daniel Stone, Graphics Lead at Collabora, replied to say "Provided the application uses a supported version of the OpenGL API, it will be able to run unmodified using the OS's DirectX 12 driver. This applies to any application, not just games! :)".
What's interesting here then, is not how this directly benefits Linux/Linux Gaming but cross-platform compatibility as a whole which is great. Especially good when it's using open source already, so improvements can go back into upstream Mesa, therefore making Linux drivers even better in future.
I'm keen for anything open source like this that can help developers, good stuff.
See the full blog post on the Collabora website.
But, honestly, using "DirectX 12" is like betting on a dead horse. I mean, who needs DX12 when we have Vulkan? On the other hand, DX12 is all Microsoft® has, so they are out of options… :S:
So I don't buy all this "we are good now" act, until we'll see Vulkan support on Xbox and any other devices that MS tightly control.
Last edited by Shmerl on 24 March 2020 at 5:24 pm UTC
QuoteThis means that a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs.not be a really bad thing?
Quoting: SchattenspiegelI may be completely wrong here, but would this part:Nope, it helps prevent the Apple situation with OpenGL seeing total crap support for a very long time and eventually they will remove it as it's deprecated in favour of Metal which screwed over a lot of developers.
QuoteThis means that a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs.not be a really bad thing?
Quoting: Liam DaweQuoting: SchattenspiegelI may be completely wrong here, but would this part:Nope, it helps prevent the Apple situation with OpenGL seeing total crap support for a very long time and eventually they will remove it as it's deprecated in favour of Metal which screwed over a lot of developers.
QuoteThis means that a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs.not be a really bad thing?
No , MS won't break compatibility ever which is why they lead consumer market. Even there are some odd examples ; your 10 year old games will still work on newest Windows.
But i doubt implementing OGL over D3D is a good thing at all. Because what MS tries to achieve with it is forcing hw vendors to put all weight on D3D12 drivers but nothing else. So in the end ; OGL apps that relies on it can work but in a very poor state. So that might be another " See , other api's suck. While DX12 Ultimate shines all above them." because they're used to do such marketing.
They did on Vista days anyway which kinda sped up death of OGL usage on modern apps.
Quoting: LeopardBut i doubt implementing OGL over D3D is a good thing at all. Because what MS tries to achieve with it is forcing hw vendors to put all weight on D3D12 drivers but nothing else. So in the end ; OGL apps that relies on it can work but in a very poor state. So that might be another " See , other api's suck. While DX12 Ultimate shines all above them." because they're used to do such marketing.I get what you're saying, however, with it relying on Mesa unless Microsoft go entirely out of their way to break it by drastically changing DX12 (which they can't, as it would break anything shipping DX12) - it will keep on working. That's the point of this. It uses open source, which can continue to improve and Windows gets decent OpenGL support which does help cross-compatibility.
They did on Vista days anyway which kinda sped up death of OGL usage on modern apps.
Reason why OGL is still a relevant api these days ( for professional use cases like CAD apps etc ) is Nvidia and Nvidia's OGL driver is pretty solid on both platforms.
OGL on D3D won't be featureful like NV driver or even AMD's very slow OGL driver,which i don't even take account of many many OGL driver app profiles goes for somewhat broken but important apps. So i think that is not so beneficial as it might seem. There are vendors who can deliver solid OGL implementations already. If they somehow join into this trend and starts to abandon OGL driver of theirs , this might give D3D12 a critical edge over Vulkan , which fears me most.
https://twitter.com/_Humus_/status/1018846492273119233?s=19
Funny story about how AMD screwed with their OGL driver btw.
I'm not sure why its hard to open-source drivers under windows, maybe Microsoft says no?
Now why go the DX12 route rather than Vulkan route (which, I'd assume could provide higher version OpenGL compliance, since hw compliance for VK is roughly the same as for GL 4.5), I'd assume is because it would be expected better DX12 support rather than Vulkan support from IHVs, especially hardware found in Microsoft devices. So I guess this is twofold: For better support for Surface devices, as well as having a broader catalog of (older) games for the Xbox. Sure CAD applications and medical could also benefit.
Last edited by Thetargos on 25 March 2020 at 1:19 am UTC
See more from me