Triton: DirectX 11 Driver for QEMU

(blog.getutm.app)

196 points | by electricant 1 day ago

9 comments

  • aktau 6 hours ago
    Reminds me of VirGL [1] and Venus [2], which I think do something similar for OpenGL and Vulkan.

    I use this with Baguette/Crostini on ChromeOS to get some light gaming done. Works very well [3].

    [1]: https://docs.mesa3d.org/drivers/virgl.html

    [2]: https://docs.mesa3d.org/drivers/venus.html

    [3]: For Baguette, the Crostini-replacement, one needs to do a minor amount of tweaking to get 3D acceleration to work well (https://www.reddit.com/r/Crostini/comments/1sftdu1/comment/o...).

  • mutkach 19 hours ago
    That’s like (at least) third GPU-related project named Triton
    • cl3misch 19 hours ago
      I was expecting DirectX in triton-lang https://github.com/triton-lang/triton
    • whatever1 15 hours ago
      Nobody named theirs Deuteron? (Sorry could not resist)
      • zer0zzz 10 hours ago
        I seriously considered this name for a triton related project. Well there’s helion (metas autotuning dsl) at least.
    • NBJack 9 hours ago
      Let's not forget the now defunct line of Trident graphics cards, dating back to the early 90s. Phonetically I thought they were talking about a driver for it.
  • equinumerous 12 hours ago
    Nice, I've been waiting for something like this for years. Meanwhile the gaming scene on linux has been getting better slowly thanks to Valve and friends... but being able to boot into a Windows VM with graphics acceleration was previously a pain on Linux machines that only have a single discrete GPU - I'd wonder whether a solution like this would work with VirtualBox, or only on QEMU.
  • jamesu 20 hours ago
    Pretty cool to finally have a decent open 3d solution for windows vms. Now if only someone made an opengl driver for older intel macosx vms...
  • paulryanrogers 11 hours ago
    Does this mean DX1-10 are also supported? I've been struggling to play some DX3-7 games because of VirtualBox and VMware limitations and Win10+ backward compatibility gaps.

    Article is quite long and technical, so it wasn't clear to me. That said, still great to hear Windows guests are getting some attention, especially from a long lived project that's proven it's not going anywhere.

    • Narishma 57 minutes ago
      If the system requirements for those games are low and your host machine fast, your best bet is probably something like 86Box.
    • 0points 5 hours ago
      You'll get best compatibility for 20+ year Windows gaming using either

      A) qemu with a XP/Vista guest and a older dedicated nvidia gpu pass thru.

      B) Fully software using 86box/pcem but performance will suffer.

    • SXX 6 hours ago
      DX3-7 is now well supported with D7VK (fork of DXVK).

      Likely such games will work better under Wine rather than modern Windows.

    • whatevergoesher 8 hours ago
      Your options there are DOSBox-X, DOSBox Pure Unleashed, Winebox, WineD3D, DxWnd, DGVoodoo2 and my personal favourite, which is more in line with what you are talking about, SoftGPU.

      SoftGPU is a DX capable driver for Win9x that runs on VMware and VirtualBox.

  • anonymousiam 20 hours ago
  • thehias 19 hours ago
    why always only DX11, why not DX12? Parallels and VMWARE can also do only DX11??
    • tyfon 19 hours ago
      DX11 is much more high level while DX12 implements direct control over the GPU. 12 is much more like vulkan.

      I guess since this is emulating the device instead of just passing the commands to vulkan it is easier to do DX11, but I could be wrong about this particular implementation.

      • bellowsgulch 14 hours ago
        DirectX 12 isn't just much more like Vulkan, it's so shockingly similar, it's basically Vulkan. It's jarring when you read it for the first time because you ask yourself why it even exists, but a second later, you realize it's so Microsoft can own their own graphics interface, too.

        I could be remembering this incorrectly, but that's the impression I remember.

        • aseipp 12 hours ago
          DX12 was over 2 years old by the time Vulkan was released. People in the industry also use DirectX extensively and have for decades (Vulkan is fairly marginal in comparison); many modern graphics API features (mesh shaders, ray tracing) were designed and developed in DirectX, as Microsoft worked with closely with ISVs on these features before they spread to wider audiences and published specifications.

          Honestly if you are creating games, with the rise of Proton and vkd3d, there is seemingly less need to target Vulkan today than ever before. Just target x86_64 Windows with DirectX11 or DirectX12 and you will even get Linux support (and some day, probably macOS) "for free". That's just for games, though.

          • anthk 1 hour ago
            Vulkan existed before with AMD's Mantle or whatever was called.
        • flohofwoe 7 hours ago
          They look similar because both D3D12 and Vulkan have been 'influenced' by Mantle (Vulkan more strongly than D3D12 though).

          Vulkan was released after both Metal and D3D12 btw.

          • pjmlp 4 hours ago
            And only exists in first place because AMD offered Mantle to Khronos, otherwise they would probably be discussing how OpenGL vNext would look like to this day.

            While flohofwoe certainly knows this, for the others,

            "Khronos is free to take as many pages as it wants out of the Mantle playbook, and AMD will impose no restrictions, nor will it charge any licensing fees."

            -- https://www.phoronix.com/news/MTc2Mzc

        • izacus 13 hours ago
          There's that small thing of DirectX 12 predating Vulkan (and massively predating the useful Vulkan specs).
    • flohofwoe 7 hours ago
      D3D11 is the by far most used 3D API on Windows (there are thousands of D3D11 games versus hundreds of D3D12 and much fewer Vulkan games), and most games don't actually have better performance with D3D12 or Vulkan anyway. So from a pragmatic 'bang for the buck' point of view, D3D11 both for the frontend and backend makes the most sense.
      • swiftcoder 6 hours ago
        A pretty healthy proportion of games also shipped a DX11 renderer alongside their DX12 one, since the addressable audience of DX12 was pretty lousy for a long time
    • Squarex 19 hours ago
      DX12 is much more complex to implement. Very different API.
  • iberator 22 hours ago
    [flagged]
    • cassepipe 22 hours ago
      I have never heard anyone diss qemu before. Care to elaborate?
      • asveikau 21 hours ago
        The other thing is that qemu is so many things. It can be a CPU emulator, a full system emulator, and a frontend to a virtualization engine. And all of this for so many different systems. It's kind of remarkable that all of this is called by the same name.
      • sph 21 hours ago
        It’s called trolling. You’re not supposed to feed the troll.
        • asveikau 21 hours ago
          You never know what's going on in the mind of another person, they could have something going on that makes them feel negatively about qemu. We can project our stress into all kinds of strange places.
        • cassepipe 17 hours ago
          I don't think someone expressing a unsubstantiated negative opinion is akin to trolling

          I would define trolling as a low-effort/sloppy attempt at a counterargumentation whose sole point is to ragebait you into looking unhinged in your response so that we can make fun of you

  • ramshanker 22 hours ago
    Maybe this is one of those topics to let an army of agents get loose.

    Nothing to lose and a lot to gain.

    • truncate 21 hours ago
      This is also one of things that needs to be well optimized to be any useful. Army of agents may get an implementation, but not sure it will be actually useful, and I'm also not sure if optimizing that implementation is going to be easier than more well paced use of LLM where person actually understands what code is being generated.
      • wrobelda 21 hours ago
        You seem to contradict yourself. Army of agents doesn't mean the person doing that doesn't understand the code. And optimization is required no matter whether the bulk of the code is written by hand or by the machine. LLMs definitely make things actually doable where previously they were nearly impossible.
        • acedTrex 20 hours ago
          > Army of agents doesn't mean the person doing that doesn't understand the code

          This is quite literally, objectively what it means lol. No human will ever seen it.

    • croes 20 hours ago
      Energy consumption and CO2 emission it causes is a pretty big lose
      • SXX 6 hours ago
        That CO2 will be emitted either way. We can choose though what % goes to funny cat videos and porn or useful open source code.
        • croes 3 hours ago
          They build new data centers -> extra CO2

          They build new power plants -> extra CO2

          They built non-climate neutral power plants to power the data centers -> extra CO2

          https://news.ycombinator.com/item?id=49223845

          It’s not like we had some already produced spare energy lying around. Consumption went up, production went up, often it’s conventional production with CO2

          There is a reason Google and MS scrapped their CO2 goals

      • compiler-devel 16 hours ago
        This argument, while totally valid, will never halt the build out of data centers nor hamper the development of AI.