GZDoom (SDL) does not seem to work properly on Weston

Mon Feb 08, 2021 6:54 am

While SDL seems to work okay on Weston (the reference Wayland compositor), it does seem to have some issues.

Test environment:

Spoiler:


It works okay for fullscreen, but in windowed mode the window simply disappears. vid_preferbackend 0 (opengl) works okay, vid_preferbackend 2 (softpoly) simply crashes.

I'm sticking this in tech issues for now, not sure if the bug is in GZDoom itself or in SDL. It appears that the SDL version being compiled is 2.0.0 (what is available in Ubuntu's apt repo).

Re: GZDoom (SDL) does not seem to work properly on Weston

Sat Feb 13, 2021 1:12 pm

SDL on Ubuntu 20.04 should be 2.0.10. I would definitely build the latest SDL and check that first. Also check setting vid_sdl_render_driver to software.

But I definitely wouldn't rule out a bug in the use of SDL_Renderer for SoftPoly. On Linux the only value proposition is that with the software render driver it does provide a pure software code path, but on systems with OpenGL or Vulkan available it's slower even for throwing the Carmack renderer to the screen (even when not using the software render driver) so I'd be surprised if it gets a whole lot of testing.

Re: GZDoom (SDL) does not seem to work properly on Weston

Sat Feb 13, 2021 2:06 pm

Softpoly crashes on arm due to the memory alignment problem.

Re: GZDoom (SDL) does not seem to work properly on Weston

Sat Feb 20, 2021 12:46 pm

I recently tested GZDoom on Softpoly backend on a Amlogic S912 device running Manjaro ARM 64-bit and it doesn't seem to crash. Is it some sort of CPU/RAM problem exclusive to the Raspberry Pis?

Re: GZDoom (SDL) does not seem to work properly on Weston

Sat Feb 20, 2021 12:55 pm

Possibly, I don't know. I know Pi's don't typically use the most up-to-date ARM chips but I also wouldn't expect it to fail on something this badly either. Even if so - I would have thought maybe the compiler would catch it.

Re: GZDoom (SDL) does not seem to work properly on Weston

Mon Mar 01, 2021 12:40 pm

Does compiling GZDoom with -march=armv8-a fix the Softpoly crash?

Re: GZDoom (SDL) does not seem to work properly on Weston

Tue Mar 02, 2021 4:43 pm

Heya - I saw your message and I plan to test it when I can, but right now the system is not set up.

Re: GZDoom (SDL) does not seem to work properly on Weston

Wed Mar 03, 2021 12:09 am

Do also try with -march=armv8.2-a if compiling with -march=armv8-a doesn't fix the Softpoly crash when you finally set up your system. There was a couple of memory model changes introduced in the ARMv8.2-A revision.