Live data from Hacker News

DirectX is coming to the Windows Subsystem for Linux

devblogs.microsoft.com

111–120 of 548 posts

Re: DirectX is coming to the Windows Subsystem for Linux

#111
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.

Re: DirectX is coming to the Windows Subsystem for Linux

#112
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…

The associated blog post ( https://devblogs.microsoft.com/directx/directx-heart-linux/ ) does have more details on exposing display functionality. There is no swapchain functionality yet, but it's clear they're working on it, and part of the work is "DxCore", which seems to be a cleaned up and simplified version of DXGI. So not now, but soon.

Yeah, this should be the right link. TL;DR Microsoft brings DirectX 12, OpenGL, OpenCL, and CUDA to WSL. Vulkan is under investigation. That's really a piece of exciting news!

Re: DirectX is coming to the Windows Subsystem for Linux

#113
post #6

...and extend. I'm sure this architecture was easier for MS but it opens the door to code that runs on WSL2 that doesn't run on regular Linux.

> but it opens the door to code that runs on WSL2 that doesn't run on regular Linux. Which is exactly what I was expecting since day one when WSL was announced. WSL is going to slowly kill Linux, or to be more accurate, it will kill any Linux (be it on servers or desktops) not Microsoft branded and distributed. Forks on smaller embedded systems will resist for a while, until one day MS decides to port some killer tec…

I think Windows has been trying to kill linux for what, almost 30 years? Some of that conspiracy mentality may have been valid 15 years ago, but probably not anymore.

Re: DirectX is coming to the Windows Subsystem for Linux

#114

Earlier quoted context omitted.

Microsoft doesn’t consider desktop Linux its competition, it considers MacOs its competition. It’s going after macbook’s position as the default developer laptop and Apple deserves what’s coming to them IMO, for neglecting it for so long.

> after macbook’s position as the default developer laptop Perhaps in your country/field. Certainly not in mine...

Sorry I can't hear you over the airplane engine that's apparently inside the 16inch mbp

Re: DirectX is coming to the Windows Subsystem for Linux

#115
Not impressed, especially since it's still a blob.

MS should stop fooling around and should start supporting Vulkan instead of pushing their DX lock-in and making hypocritical statements how they aren't on the wrong side of history anymore because they "support open source". The above feels like typical MS EEE.

Re: DirectX is coming to the Windows Subsystem for Linux

#116
post #96

Earlier quoted context omitted.

Is there a possibility Linux upstream won't accept it?

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. If there are people who would run a Linux desktop for development who then decide not to because WSL exists, perhaps that's a bad outcome.

I think if that really matters you should be against anything in the kernel to make it work well as a VM under Windows or MacOS or BSD, and in VMware or VirtualBox too.

From that point of view, Linux in a VM on another host is taking away from Linux running as a desktop on that host. Linux running as a VM on a VMware cluster is taking away from Linux running on those bare metal servers instead of VMware ESXi.

I think the more sane way to look at it is that Linux is an application (and its subcategory is that it is an OS) which is meant to run on various hardware and software platforms, the more the better. This strategy has worked very well over that last couple decades.

Does allowing WSL mean that some people that would install Linux on their hardware just run Windows instead and use Linux on top? Probably. Does it mean that people that already ran Windows and have never used Linux get exposed to it for the first time and get familiar with it through a few click on their existing Windows computer? That's also probable. Does it really matter in the end? Probably not.

Re: DirectX is coming to the Windows Subsystem for Linux

#117
post #61

Earlier quoted context omitted.

In the linked thread the Microsoft developers explicitly deny that this is the intent, if that's worth anything to you. The goal, rather, is to take all the usual (for the Linux side) GPU stuff and give it access to the Windows host's GPU, when running on WSL. That is, they are already working on getting OpenGL/Vulkan/etc. to run on top of this: https://www.collabora.com/news-and-blog/news-and-events/intr... Rather t…

The developers' word is irrelevant. Microsoft is a business. Microsoft will pursue its long term business interests. Developers are hired to do what the business directs. So the question is really, "what would best serve Microsoft's business interests?" and not "what do the developers intend?" because in time only one question matters and unfortunately it's not the one with the best interests of non-windows-users in…

The developers' intent does align with Microsoft's current interests -- as you say, they are hired to do what the business directs.

Perhaps their interests will shift in the future, as they clearly have in the past. But the things they build now are not from the "extend" phase of an EEE arc. At worst they are in the "embrace" phase.

Re: DirectX is coming to the Windows Subsystem for Linux

#118

The Year of the linux desktop has come

Actually, the year of Linux on the desktop will never come also thanks to this. Developers will find more comfortable writing Linux software on Windows (some already do); desktop users will have both worlds at hand without being forced to dual boot; Linux gamers won't have any reasons to keep using native Linux. Etc. I foresee in a not so distant future Microsoft integrating Windows UI elements and events hooks right…

> the year of Linux on the desktop will never come also thanks to this.

I think you're giving MS too much credit here. Apple has one UI, and Windows has one UI (2 if you count windows in tablet mode). Linux has, what? 30?

Quoth the Torvalds:

"I still wish we were better at having a standardize desktop that goes across all the distributions… It’s not a kernel issue. It’s more of a personal annoyance how the fragmentation of the different vendors have, I think, held the desktop back a bit."

Only recently did Ubuntu stop trying to push Unity and accepted Gnome, thereby reducing fragmentation by 1.

https://itsfoss.com/desktop-linux-torvalds/

Re: DirectX is coming to the Windows Subsystem for Linux

#120
I found this reply to be especially interesting: https://lkml.org/lkml/2020/5/19/1309

> I also have another concern from a legal standpoint I'd rather not review the ioctl part of this. I'd probably request other DRI developers abstain as well.

> This is a Windows kernel API being smashed into a Linux driver. I don't want to be tainted by knowledge of an API that I've no idea of the legal status of derived works. (it this all covered patent wise under OIN?)

> I don't want to ever be accused of designing a Linux kernel API with illgotten D3DKMT knowledge, I feel tainting myself with knowledge of a proprietary API might cause derived work issues.

This is the real scary part about software patents, and more specifically, patenting APIs. I'm not saying Microsoft is doing this in this case, but it could be a very real strategy by a bad actor. Attempt to taint open source software with your patented software and then litigate.

In a dystopian future where patented software API lawsuits have become a common occurrence, I could imagine "clean room people". Individuals who can be guaranteed to not have been exposed to certain software designs.

Post reply on HN