Live data from Hacker News

DirectX is coming to the Windows Subsystem for Linux

devblogs.microsoft.com

181–190 of 548 posts

Re: DirectX is coming to the Windows Subsystem for Linux

#181

Earlier quoted context omitted.

Ah that sucks, for a moment I thought I would be able to run Wine from within WSL2 and get my game on.

if you are already running Windows and using Linux through WSL, why would you want to use WINE to run games?

Possibly parent comment was a joke?

Re: DirectX is coming to the Windows Subsystem for Linux

#182

I really wish Microsoft would just tell NVidia (and AMD) to support SR-IOV on all their GPUs. Then we wouldn't need any major software changes to enable CUDA acceleration within VMs, just a configuration change to pass through a virtual function of the GPU to make it available to existing drivers.

I agree, this would dramatically simplify the situation

Re: DirectX is coming to the Windows Subsystem for Linux

#183
post #122

Earlier quoted context omitted.

Why would it? That's a functionality that can't be used without Microsoft proprietary parts. Unless I missed something, I don't think there is an open source implementation of DirectX somewhere? I doubt the linux devs ever see WLS as a target they have to maintain themselves.

Wine has an open source implementation of DirectX, FWIW.

Ok, not my field, but isn't it based on OpenGL? Does it count as an implementation or an emulation layer? My understanding is that Microsoft is trying to give WSL a transparent access to the GPU using the regular linux interface and transmitting it to DirectX.

Using that with wine would mean adding two emulation layers before reaching the actual driver. I fail to see any use case for that.

Re: DirectX is coming to the Windows Subsystem for Linux

#184
post #96

Earlier quoted context omitted.

If you read the replies by Dave Airlie and Daniel Vetter, it seems somewhat likely that upstream won't accept it. Perhaps that's just initial skepticism that will evaporate after more discussion, but perhaps not. Frankly this does just seem like MS wanting to reduce their maintenance burden on what they expect will be a very important part of their WSL offering on Windows. There's nothing inherently wrong with that d…

>>>There's also the question of whether or not you believe WSL as a whole is good or bad for Linux. IMO it's a good thing. Given that windows accounts for 90%+ of the desktop OS share, Windows might very well become the world's most used Linux distro.

IMO it's exactly embrace extend extinguish that parent noted that can be spun to kick CUDA out of the game for Linux which is good in short term.

Re: DirectX is coming to the Windows Subsystem for Linux

#185

Earlier quoted context omitted.

I've had trouble researching if WSL2 is in fact a hyper-v managed VM. I've seen some documentation referring to WSL2 as a tightly integrated Krypton (scaled down hyper-V) VM. It seems to imply the host overhead isn't as high as a guest on hyper-V

WSL uses a Hyper-V derived virtual machine that is * Sparse & light - they only allocate resources from the host when needed, and release them back to the host when freed * Fast - it can boot a WSL distro from cold in Full Hyper-V VMs aim to (generally) grab all the resources they can and keep hold of those resources as long as possible in case they're needed. Full VMs are designed to run for months-years at a time.…

But then you have this thread with people running Cron jobs to free cached memory: https://github.com/microsoft/WSL/issues/4166

I imagine this will be addressed, but claims of lightweight seem exaggerated?

But even more on my mind is the impact on the windows host. Is it running as a guest under hyper v? What's the overhead?

Re: DirectX is coming to the Windows Subsystem for Linux

#186
post #29

Earlier quoted context omitted.

They are also adding an wayland server. https://devblogs.microsoft.com/commandline/the-windows-subsy...

Aren't large parts of the wayland stack incompatible with NVIDIA drivers? It would be ironic if Microsoft was the one to bridge that gap.

You can use Wayland with NVIDIA drivers. The problem is that NVIDIA and the open source drivers expose different buffer management APIs and Wayland does not abstract over that, so it has to be explicitly handled by every client application. Some Wayland clients refuse to support both, others had NVIDIA support patched in by NVIDIA itself.

Re: DirectX is coming to the Windows Subsystem for Linux

#187
post #7
post #2

> This also enables third party APIs, such as the popular NVIDIA Cuda compute API, to be hardware accelerated within a WSL environment. Dollars to donuts this is why Microsoft is implementing this. GPU acceleration is becoming a critical feature for many users (but especially developers) and this will continue. If WSL is to be a serious competitor, this is necessary and I'm glad to see it showing up. This is true of…

Do ML people actually care about DirectX? I thought everyone is using CUDA? Anyway in my university building I have not seen anyone that does machine learning on Windows.

In ML if you decide not to kiss NVIDIA's ass you're screwed. Figuratively they have 100% market share. Having major alternative backend, even if it's proprietary, will force diversity and that has some upsides I think.

Re: DirectX is coming to the Windows Subsystem for Linux

#188
post #123

Earlier quoted context omitted.

Because this benefits only WSL. I don’t think that the Linux maintainers should spend time and effort maintaining a shim that only benefits users on another operating system. It does not even lead to cross platform code if a dev uses this on WSL. Microsoft can ship it however they please though within bounds of licenses.

They've already upstreamed lots of other hyper-v paravirtualization infrastructure. And why do you assume it only helps WSL? Doesn't this help all hyper-v setups get access to GPUs, including azure?

Probably because its a shim to use a proprietary (only distributed by MS) binary blob version of DirectX compiled for Linux. Outside of ML utilizing DirectX in WSL on Windows, the only group that this helps is MS.

FTR, I'm not arguing whether or not this should be upstreamed. I just see where the other poster could be coming from. I could be wrong on my take and if so, someone please correct me.

Re: DirectX is coming to the Windows Subsystem for Linux

#189
post #188

Earlier quoted context omitted.

They've already upstreamed lots of other hyper-v paravirtualization infrastructure. And why do you assume it only helps WSL? Doesn't this help all hyper-v setups get access to GPUs, including azure?

Probably because its a shim to use a proprietary (only distributed by MS) binary blob version of DirectX compiled for Linux. Outside of ML utilizing DirectX in WSL on Windows, the only group that this helps is MS. FTR, I'm not arguing whether or not this should be upstreamed. I just see where the other poster could be coming from. I could be wrong on my take and if so, someone please correct me.

They also ported OpenCL and OpenGL to it via Mesa. Vulkan is in the works, and you can use CUDA if the host GPU supports it.

Would y'all be so worked up about VMWare upstreaming their virtual GPU bridge?

Re: DirectX is coming to the Windows Subsystem for Linux

#190
post #2

> This also enables third party APIs, such as the popular NVIDIA Cuda compute API, to be hardware accelerated within a WSL environment. Dollars to donuts this is why Microsoft is implementing this. GPU acceleration is becoming a critical feature for many users (but especially developers) and this will continue. If WSL is to be a serious competitor, this is necessary and I'm glad to see it showing up. This is true of…

And wouldn't be faster simple use native Linux installed on the computer ? Instead of running on a VM, and a glue/translation layer from OpenGL/OpenCL/Vulkan/CUDA to DirectX. And don't forgot all the blotware and slowness that have Windows 10.
Post reply on HN