Tuesday, May 19th 2020

DirectX Coming to Linux...Sort of

Microsoft is preparing to add the DirectX API support to WSL (Windows Subsystem for Linux). The latest Windows Subsystem for Linux 2 will virtualize DirectX to Linux applications running on top of it. WSL is a translation layer for Linux apps to run on top of Windows. Unlike Wine, which attempts to translate Direct3D commands to OpenGL, what Microsoft is proposing is a real DirectX interface for apps in WSL, which can essentially talk to hardware (the host's kernel-mode GPU driver) directly.

To this effect, Microsoft introduced the Linux-edition of DXGkrnl, a new kernel-mode driver for Linux that talks to the DXGkrnl driver of the Windows host. With this, Microsoft is promising to expose the full Direct3D 12, DxCore, and DirectML. It will also serve as a conduit for third party APIs, such as OpenGL, OpenCL, Vulkan, and CUDA. Microsoft expects to release this feature-packed WSL out with WDDM 2.9 (so a future version of Windows 10).
Source: DirectX Blog
Add your own comment

37 Comments on DirectX Coming to Linux...Sort of

#2
Aquinus
Resident Wat-man
That's cute, but I'm still not installing Windows and working on WSL. I'll give Microsoft that they've made a lot of progress, but I like developing on the platform that my software actually runs.
Posted on Reply
#3
Decryptor009
A reason to finally ditch Windows? i'm in, i prefer free software.
Posted on Reply
#4
moproblems99
AquinusThat's cute, but I'm still not installing Windows and working on WSL. I'll give Microsoft that they've made a lot of progress, but I like developing on the platform that my software actually runs.
I'm trying figure out if this would be useful for porting Directx to Linux so-to-speak to be used in tandem with something like wine.
Posted on Reply
#5
tabascosauz
Decryptor009A reason to finally ditch Windows? i'm in, i prefer free software.
That's not the point here...

Wine is what allows you to run some Windows applications in Linux. WSL facilitates virtualization of a Linux kernel in Windows, on top of which Linux applications can be run in Windows. I don't see how that relates to ditching Windows at all.
Posted on Reply
#6
windwhirl
moproblems99I'm trying figure out if this would be useful for porting Directx to Linux so-to-speak to be used in tandem with something like wine.
I guess it could be useful if you didn't want to train a DX guy/girl in Vulkan/OpenGL since you know for sure whatever it is you're running/going to run will always run on WSL and will have access to DirectX.

But why would someone run that kind of hybrid? Wouldn't it be better to just go fully Linux + Vulkan/OpenGL/whatever-API or fully Windows + DirectX?

I honestly don't get what's Microsoft's motive for doing this.

EDIT: Adding to the growing list of questions, would it be useful for VMs? Like, have a bunch of Linux VMs running inside HyperV and using this to expose DX features to the VM in a more direct way?
Posted on Reply
#7
lexluthermiester
tabascosauzThat's not the point here...

Wine is what allows you to run some Windows applications in Linux. WSL facilitates virtualization of a Linux kernel in Windows, on top of which Linux applications can be run in Windows. I don't see how that relates to ditching Windows at all.
Seems clear he misunderstood.

I am not impressed. If Microsoft released the DX API for use on Linux that would be amazing. But the subject of this article is simple nonsense. No one wants to run Linux software in Windows. The other way around, hell yes. This is yet another example of Microsoft having it's head firm lodged were the Sun doesn't shine.
Posted on Reply
#8
BArms
lexluthermiesterSeems clear he misunderstood.

I am not impressed. If Microsoft released the DX API for use on Linux that would be amazing. But the subject of this article is simple nonsense. No one wants to run Linux software in Windows. The other way around, hell yes. This is yet another example of Microsoft having it's head firm lodged were the Sun doesn't shine.
You might be underestimating WSL's usefulness. You can currently run almost any Linux binary on Windows (or compile the Linux Kernel) and this brings that a step further by supporting GUI apps. I imagine with this change, you'll be able to develop a game/app with Unity and test both Windows and Linux builds from the same devbox, seamlessly. I also suspect a lot of games/graphical apps that were previously linux-only (are there any?) will run better on Windows since graphics driver support for Linux is notoriously bad.
Posted on Reply
#9
moproblems99
windwhirlAdding to the growing list of questions, would it be useful for VMs? Like, have a bunch of Linux VMs running inside HyperV and using this to expose DX features to the VM in a more direct way?
I can't think of anymore usefulness to VMs than I can a regular host.
lexluthermiesterNo one wants to run Linux software in Windows.
Maybe not you, but I have to do it all the time.
Posted on Reply
#10
remixedcat
Microsoft is admitting defeat on their own os.. most important things have been for everything else but windows..

While windows gets more brickage
Posted on Reply
#11
moproblems99
remixedcatMicrosoft is admitting defeat on their own os.
Um, no. They are well positioned to remain the dominant home OS. Forever.
Posted on Reply
#12
remixedcat
Not with how bad v windows 10 has gotten... more friends switching to mac or linux every day,....
Posted on Reply
#13
tabascosauz
At least on the 2004 previews, both Throttlestop and XTU are broken when one of WSL's prerequisite virtualization settings is set to enabled. So if you have a premium laptop or ultrabook that relies on TS to stay away from 100C and throttling, but also might make regular use of WSL, it might be time to pick a path. Not that it's a relevant concern to most of us, but it just goes to show how dependent a lot of us laptop owners are on an ancient driver that Microsoft is always keen to break. Which doesn't even explain why it breaks XTU, because it doesn't rely on the same WinRing0.dll as TS; XTU is official Intel software and is usually unaffected when WinRing0 is prevented from functioning, as a result of Core Isolation for example. So Macroshit has really outdone itself here.
Posted on Reply
#14
windwhirl
To be fair to Microsoft, no laptop should reach 100 C. The blame for that is on the manufacturer mostly.
Posted on Reply
#15
tabascosauz
windwhirlTo be fair to Microsoft, no laptop should reach 100 C. The blame for that is on the manufacturer mostly.
Well, "should" and "will" are two very different things. :oops: It's pretty much a staple now for all but the bulkiest Intel laptops. The OEMs take most and Intel some of the blame for that, but Microsoft is the one with the reputation for breaking something in every Windows update and using the Windows userbase as its unpaid testing department interns.

I hope this'll be fixed in the 2004 release. I'm pretty lucky that my desktop takes all intensive tasks off my XPS, but not all developers can say the same.
Posted on Reply
#16
windwhirl
tabascosauzWell, "should" and "will" are two very different things. :oops: It's pretty much a staple now for all but the bulkiest Intel laptops. The OEMs take most and Intel some of the blame for that, but Microsoft is the one with the reputation for breaking something in every Windows update and using the Windows userbase as its unpaid testing department interns.

I hope this'll be fixed in the 2004 release. I'm pretty lucky that my desktop takes all intensive tasks off my XPS, but not all developers can say the same.
For reference, AMD's Ryzen Master doesn't work either if you have HyperV enabled. So I don't think it's broken, but rather it seems to be by design that you can't use XTU or TS with virtualization enabled.
Posted on Reply
#17
las
Very interesting .. it will probably always be a more wonky experience tho
Decryptor009A reason to finally ditch Windows? i'm in, i prefer free software.
Windows 10 is pretty much free. There is tons of ways to get it for free. Microsoft could not care less about the peanuts people pay for Windows 10 anyway, it's all about marketshare, and they continue to dominate here
Posted on Reply
#18
lexluthermiester
BArmsYou might be underestimating WSL's usefulness. You can currently run almost any Linux binary on Windows (or compile the Linux Kernel) and this brings that a step further by supporting GUI apps. I imagine with this change, you'll be able to develop a game/app with Unity and test both Windows and Linux builds from the same devbox, seamlessly. I also suspect a lot of games/graphical apps that were previously linux-only (are there any?) will run better on Windows since graphics driver support for Linux is notoriously bad.
I understood that. Just disagree with such a notion entirely. Want to dev for Windows? Run Windows. Want to dev for Linux? Run Linux.
Posted on Reply
#19
remixedcat
windwhirlFor reference, AMD's Ryzen Master doesn't work either if you have HyperV enabled. So I don't think it's broken, but rather it seems to be by design that you can't use XTU or TS with virtualization enabled.
Dev's often and should use virtualization so this would bite them in that regard too.
Posted on Reply
#20
OneMoar
There is Always Moar
tabascosauzWell, "should" and "will" are two very different things. :oops: It's pretty much a staple now for all but the bulkiest Intel laptops. The OEMs take most and Intel some of the blame for that, but Microsoft is the one with the reputation for breaking something in every Windows update and using the Windows userbase as its unpaid testing department interns.

I hope this'll be fixed in the 2004 release. I'm pretty lucky that my desktop takes all intensive tasks off my XPS, but not all developers can say the same.
3d party software using very old unsupported library (winring0 has not had a code commit or update since 2017 ) is not Microsoft problem

and its by design that you don't have low level access with hyper-v turned on that is literally why it exists

using Linux is basically a continuous unpaid beta test lets not kid our selves there
Posted on Reply
#21
Aquinus
Resident Wat-man
OneMoarusing Linux is basically a continuous unpaid beta test lets not kid our selves there
Sure, if you're using a distro like Arch or Debian sid. Other distros like CentOS, RHEL, and Ubuntu's LTS releases are actually pretty solid and have undergone more testing that you might imagine. I use Ubuntu's LTS releases for a reason.
Posted on Reply
#22
OneMoar
There is Always Moar
AquinusSure, if you're using a distro like Arch or Debian sid. Other distros like CentOS, RHEL, and Ubuntu's LTS releases are actually pretty solid and have undergone more testing that you might imagine. I use Ubuntu's LTS releases for a reason.
you know what else has undergone more testing
windows 10 LTSB
Posted on Reply
#23
tabascosauz
OneMoaryou know what else has undergone more testing
windows 10 LTSB
LTSB no longer exists. Its replacement is LTSC, on 1809.

Neither does it undergo "more" testing in that sense; it is the mission critical computer systems themselves that come as a package and are tested and verified. All LTSC needs to do is double check that those select few whole systems have no compatibility issues. It doesn't make any extra guarantees whatsoever for your built gaming or workstation PC, and shares standard drivers with the consumer editions.

The "unpaid beta testing" label applies to Arch, which most users tend to stay away from because it's the equivalent (if not more) of being on the fastest, most unpredictable Insider ring build. Ubuntu 20.04 LTS and all its derivatives are full featured releases that are neither comparable to insider builds nor LTSC in what they are.
Posted on Reply
#25
Octopuss
remixedcatNot with how bad v windows 10 has gotten... more friends switching to mac or linux every day,....
What drugs are you on?
Windows 10 runs perfectly fine for vast majority of people I would say. Hundreds of millions of computers maybe?
I don't see mass exodus to Linux and macCrap headlines in newspapers.
Posted on Reply
Add your own comment
Dec 21st, 2024 23:16 EST change timezone

New Forum Posts

Popular Reviews

Controversial News Posts