Jump to content
The Dark Mod Forums

Wayland compatible engine for Linux users


MirceaKitsune

Recommended Posts

This was discussed briefly on Discord some time ago, I wanted to bring it up here as well for consistency. I don't believe it's an emergency but do consider it an important change especially later down the road, as Linux is slowly moving away from x11 with many distros already going full Wayland by default. In my case I'm pretty much waiting for KDE Plasma to fix a few bugs left with the DE before permanently switching from X11 to wayland too, I might be able to make use of it rather soon if they do.

With the new input and rendering system introduced after 2.09 and available for testing in the dev builds (GLFW) we're on our way to having a Wayland compatible build of our engine. Meaning the engine is able to render natively to the WL pipeline, without having to go through the fake x11 server simulated by the Wayland session for compatibility with X exclusive apps. This not only offers proper compatibility for Wayland users, but may improve performance on various fronts which was one of the goals of the new rendering framework.

From what I remember @cabalistic telling me, we can't have the same engine for both x11 and Wayland: It must be compiled against different system packages to produce one version or the other. For Linux users the installer may need to offer two engine binaries in this case, or an option to pick which version you'd like to install if that's better. Other than that I understand it should be able to produce in theory, as SDL2 and GLFW both offer Wayland compatible libraries to compile the engine against. I'm not familiar with the C++ code in the slightest so I'll let the experienced developers complete this with the proper technical additions.

Link to comment
Share on other sites

I don't understand the rationale.

There is X system, and there is Wayland.
The programs written for Wayland don't work in X system.
The programs written for X system work in Wayland via compatibility layer.

Given that we cannot combine both systems in one build, relying on X system sounds like the best solution.

Link to comment
Share on other sites

12 hours ago, stgatilov said:

I don't understand the rationale.

There is X system, and there is Wayland.
The programs written for Wayland don't work in X system.
The programs written for X system work in Wayland via compatibility layer.

Given that we cannot combine both systems in one build, relying on X system sounds like the best solution.

Exactly. Like you said though, running the engine on Wayland requires the X compatibility layer, which is a just that: A compatibility layer. Being able to use the features of Wayland natively is the safe route for the future, and from my understanding it may result in better performance thanks to the improved rendering pipeline.

But I wish to clarify I didn't open this thread to say "do it now"! Also Cabalistic said he doesn't want to bother with it which I respect, if other developers want to let us know. I wanted the discussion to be existent and kept alive for now, since at least in the future this will likely become important depending on which direction Linux goes.

From articles I remember reading a few months ago, some Linux distributions already went Wayland exclusive, meaning they offer the WL session by default when installed. So it replacing X11 is already happening for some distros, we are still in a transition period. X11 should of course remain the default base, that's still the standard for a long time: If the team figures out the process to compile the Wayland engine, it should remain a secondary option especially for now when we'd do initial early testing.

Link to comment
Share on other sites

  • 1 month later...
On 8/10/2021 at 7:03 PM, MirceaKitsune said:

I don't believe it's an emergency but do consider it an important change especially later down the road, as Linux is slowly moving away from x11 with many distros already going full Wayland by default.

I am all-in pro Wayland as it finally does GUI separation, which indeed is essential for desktop security when applications are expected to contain security-relevant bugs...

But that feature doesn't actually require TDM to be Wayland-aware to work.
And Wayland support would increase the maintenance burden.

Is the wrapper actually affecting performance significantly on low-end hardware which runs TDM just fine without Wayland?
Is TDM more likely to crash when running on the X wrapper?

Edited by Abusimplea
Link to comment
Share on other sites

8 minutes ago, Abusimplea said:

Is the wrapper actually affecting performance significantly on low-end hardware which runs TDM just fine without Wayland?

Both systems do not control OpenGL in any way, then only give "primary framebuffer" and control final image compositing. OpenGL rendering should work equally well on both systems. Maybe some specifics around compositing can add one excessive framebuffer copy in one of the cases, but it won't change much (except on integrated GPU maybe, which is too bad to play TDM comfortably).

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...