[HN Gopher] DirectX on Linux ___________________________________________________________________ DirectX on Linux Author : modeless Score : 42 points Date : 2020-05-19 22:28 UTC (32 minutes ago) (HTM) web link (lkml.org) (TXT) w3m dump (lkml.org) | woadwarrior01 wrote: | Hopefully, this will enable Windows users will be able to run | docker containers that use GPUs the way Linux users have been | able to for years now with nvidia's container toolkit[1]. | | [1]: https://github.com/NVIDIA/nvidia-docker | stefan_ wrote: | This is the kind of driver that you get when you ignore all | existing Linux code, then try to throw 15k LOC over the wall when | its all done. Microsoft should really know better: _this is not | how you get your code upstreamed_. | zakk wrote: | I remember when DirectX was a huge obstacle to porting games to | Linux. This feels like a great, great victory for Linux to me! | mmm_grayons wrote: | > 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 cloud compute, too, and Microsoft is | betting big on cloud as its future growth area. | | > Only the rendering/compute aspect of the GPU are projected to | the virtual machine, no display functionality is exposed. | | The Linux gaming folks will be pretty sad about this one. Anyway, | this isn't really a Linux port of DirectX. This is GPU compute | via DirectX APIs. | | So now, I'm just waiting on monitor mode/AF_PACKET for WSL... | modeless wrote: | Yes, machine learning is the first priority as they say in the | thread. However, the blog post goes on to say that window | system integration is coming. This will eventually be a full | graphics stack. | | > Anyway, this isn't really a Linux port of DirectX | | The entire user mode side of DirectX is ported. D3D is there. | Mic92 wrote: | 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. | modeless wrote: | CUDA is supported as well. | raphlinus wrote: | Yes, (almost) everybody doing machine learning is on CUDA. | There are multiple pieces of this work, and the DirectX API's | are only part of it. Other pieces get CUDA running as well. | | And yet another piece is a layer to get OpenCL workloads | running on DX12 as well, rather similar in scope to how | MoltenVK and the gfx-hal Vulkan Portability work are a layer | to get Vulkan workloads running on Metal. This is a big | effort, and it seems to me their goal is to get things to the | point where stuff Just Works and you don't have to think too | hard about the various bits of (technically difficult!) | infrastructure to get you there. | raphlinus wrote: | 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. | christoph-heiss wrote: | FYI: | | _This is the first draft of the Microsoft Virtual GPU (vGPU) | driver. The driver exposes a paravirtualized GPU to user mode | applications running in a virtual machine on a Windows host. This | enables hardware acceleration in environment such as WSL (Windows | Subsystem for Linux) where the Linux virtual machine is able to | share the GPU with the Windows host._ | | So this isn't actual "DirectX on Linux", just a driver for a | virtual GPU exposed to WSL-guests to enable guests to directly | use DirectX, more or less. | | Probably most useful for Azure-based projects. | jagger27 wrote: | The linked blog post in TFA has a clearer title: "DirectX is | coming to the Windows Subsystem for Linux" | kalium-xyz wrote: | The Year of the linux desktop has come | wmf wrote: | ...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. | modeless wrote: | This patch adds WDDM (Windows Display Driver Model) as a Linux | kernel API. The implementation just forwards to the Windows | kernel, but it seems to me like someone could implement it | natively in Linux. Then Windows user mode graphics drivers | would work natively in Linux without WSL, and DX12 too. | wmf wrote: | _someone could implement it natively in Linux_ | | This is exactly what we don't want. There's already plenty of | effort wasted on GBM vs. EGLStream so introducing a third API | would just lower quality even more. | [deleted] ___________________________________________________________________ (page generated 2020-05-19 23:00 UTC)