• DefederateLemmyMl
    link
    fedilink
    English
    326 months ago

    So how does that work given that most Steam games are x86/x64 and the M2 is an ARM processor? Does it emulate an x86 CPU? Isn’t that slow, given that it’s an entirely different architecture, or is there some kind of secret sauce?

    • @[email protected]
      link
      fedilink
      English
      356 months ago

      Emulation.

      Definitely going to incur a performance hit relative to native code, but in principle it could be perfectly good. It’s not like the GPU is running x86 code in the first place. On macOS, Apple provides Rosetta to run x86 Mac apps, and it’s very, very good. Not sure how FEX compares.

        • Rustmilian
          link
          English
          1
          edit-2
          6 months ago

          Thanks. That answers the part I couldn’t.

          So it’s using Virtualization for the x86_64 bits, while the DirectX11 bits are being translated by WineD3D into OpenGL as normal and the Asahi Linux OpenGL driver executes that on the GPU.

          Edit : I asked about it at the start of her steam apparently, the real Asahi driver is directly interacting with the with the game running in the VM.

          • @[email protected]
            link
            fedilink
            16 months ago

            I thought FEX was dealing with the x86_64 translation and the VM was converting 4K to 16K page sizes

            • Rustmilian
              link
              English
              1
              edit-2
              6 months ago

              It’s a bit hard to understand what she was saying because she likes super low level, even for me. But she’s was talking about how the VM is created & then the driver gets mapped directly into the VM. It’s a really interesting concept.
              I’ll have to go back when the steam ends and pay closer attention to further grasp it.

              • @[email protected]
                link
                fedilink
                16 months ago

                It really is cool, miniature VMs are such a good concept for security like QubesOS but actually possible.

                ChromeOSs Linux VM is also crazy. It is a VM, running a container image. Actually is that krun?? It seems similar.

                Then the stuff is streamed to the wayland compositor and displayed like regular windows.

                Such a cool, secure and minimalist concept.

                • Rustmilian
                  link
                  English
                  1
                  edit-2
                  6 months ago

                  Speak of containers, you just reminded me of Waydroid, such a cool underrated project.
                  All this stuff is really really cool. Anything that allows running software from completely different OS’s and Architectures are just a wonder and they help with software preservation which is very important to me.

                  • @[email protected]
                    link
                    fedilink
                    16 months ago

                    Poorly Waydroid is just vaguely secure on Distros that use SELinux, as Android uses it as a major part of its app sandboxing (called SEAndroid).

                    So if you run Waydroid on Ubuntu, which will be the most common way, (and to my knowledge was the first possible one, until aleasto packaged it on Fedora), you will have no sandboxing at all.

                    Also the Waydroid container runs as root, even though unprivileged containers can also get access to all the stuff needed. Most notably, Bluetooth doesnt even work, even though Waydroid runs as root, lol.

                    Waydroid is a perfect exable of a hacked solution simply ran as root, to circumvent any real solutions for the needed access.

                    Also it uses Android 11, which for some reason I forgot was easier to port.

                    The concept is cool though, just needs

                    1. Upgrading to Android/GrapheneOS 14
                    2. Running in a rootless and restricted container
                    3. OR running in a VM, so that SELinux can work on all distros
    • @[email protected]
      link
      fedilink
      English
      -256 months ago

      Why not click the link and find out? It’s literally a Mastodon post, you don’t even have to read much.

      • DefederateLemmyMl
        link
        fedilink
        English
        326 months ago

        The post doesn’t answer the questions, it’s why I asked.

        It says:

        All running on a krun microVM with FEX and full TSO support 💪

        I was not expecting Party Animals to run! That’s a DX11 game, running with the classic WineD3D on our OpenGL 4.6 driver!

        Now I know some of these words, but it does not answer my question.

        • Rustmilian
          link
          English
          1
          edit-2
          6 months ago

          To answer your question, I’m sure for the x86_64(not separate things btw) specific code it might use some sort of emulator or a translation layer. Idk WTF “microVM with FEX” is, maybe that’s it?

          But for the DX11 part, that’s just the normal DirectX to Vulkan/OpenGL translation layer e.g. WineD3D.
          There’s actually nothing that special about DirectX on ARM, it’s the same API. The translation layer just takes those API calls from DirectX11 and translates them to the equivalent in OpenGL, and then the Asahi Linux OpenGL driver takes of actually executing those commands on the GPU.

        • @[email protected]
          link
          fedilink
          English
          -25
          edit-2
          6 months ago

          You asked how it works, the post states how it works. You also asked if it’s slow, which is clearly answered in the post (though you didn’t quote that part). You also asked if there’s some “secret sauce” allowing it to be fast, which is also a weird question since everything used is listed in the post.

          If something wasn’t clear to you, why not specifically ask about it? Even in this comment, you still don’t specify what you don’t understand. What kind of answer are you expecting to get?

        • @[email protected]
          link
          fedilink
          English
          -346 months ago

          You can Google the words you don’t know, and find out that it does in fact answer your question.