Legacy Hardware and Deprecation

Sat Jun 03, 2017 4:35 pm

There have been some discussions lately on the forum about how difficult it is to run GZDoom on old hardware.

You might think - "Doom is an old game. All I ever need is Doom." That's fine. Doom can run on old systems. But not GZDoom. The point of GZDoom is to run Doom on modern hardware, using modern rendering techniques that are more efficient on modern computers. It turns out that in many cases, the techniques that are best suited for modern computers are ill suited for, or even entirely incompatible with, old hardware. And inversely, optimizations that made sense on old computers can be counter-productive on modern hardware.

"But I shouldn't need a computer that runs Crysis 5 just to run Doom!" - and you'd be right. If you want to just play Doom on a system that could run the original, "vanilla" engine, then you can still do so and just play Doom with its original engine. If you want, however, to play modern GZDoom mods that push the Doom engine far beyond its original limits while enabling all sorts of effects that the original doom.exe never offered, then you have to realize that your old computer cannot do that. It cannot do that with GZDoom, just like it cannot do that with the original doom.exe. One important thing that needs to be remembered here is that the entire level setup of Doom is extremely hostile towards how modern graphics hardware works. Modern hardware can work best with large meshes that are being processed with a single draw call. Doom is the complete opposite of that: It is rare that a single draw call contains more than 10 vertices but there can be tens of thousands of them on modern and very detailed levels. This will lead to even seemingly 'primitive looking' data requiring more processing time than modern games which have been optimized for the hardware. That is part of why GZDoom can be slower than some of those newer games.

The vast majority of users who use GZDoom nowadays have computers that are at least capable of running games from the ~2012 era (i.e. capable of supporting OpenGL 4.x), and some possibly even newer than that. It would be a disservice to keep catering to users that use systems which are much older than that. Not to mention, it creates a whole lot of code bloat and makes the source tree much bigger than it needs to be. In some cases, keeping support for old hardware in can even make it impossible to implement features for newer hardware because the necessary approaches are mutually incompatible.

Basically what it comes down to is this: Doom is a 1993 game. If you want to run Doom on your 1993 system - by all means, go right ahead. But don't expect a source port that is being coded for modern computers to keep running on that same 1993 system. Times change, people get rid of those old systems, and they want something new. That's what GZDoom is.

Keep in mind that basically all hardware being manufactured in the last 5 years will be capable of running GZDoom with all effects enabled - performance issues nonwithstanding. It will also be capable of running with all non-postprocessing effects enabled on all non-integrated graphics hardware from the last 10 years and on a basic setting for even older systems. The software renderer with the Direct3D backend contains support for hardware up to 14 years of age.

So when we say things like "DirectDraw" is deprecated - that literally means, DirectDraw is going to be removed from the code base soon. If you do not have at least semi-decent pixel shader capable graphics card from 2003 or later, you will have to either keep using an older version of GZDoom, or perhaps look into ZDoom-LE ("Legacy Edition"), which is made specifically for outdated hardware but which, obviously, does not offer the more modern features that you will find in recent versions of GZDoom.

Here are some examples of some enhancements that were made to benefit modern computers, but unfortunately, could not be done likewise for older computers:
  • TrueColor renderer was created for hardware-accelerated back-ends, not DirectDraw, where it likely would have run very poorly on modern systems.
  • OpenGL 1.x support was dropped during GZDoom's 1.8.x series, and inherently kept out during the later 2.x series, due to severe maintenance overhead in the source code. Several features GZDoom depends on are only available on GL 2.x hardware and working around them is not easy.
  • Features get dropped on OpenGL 2.x hardware, for the same reasons. It should also be considered that most effects that were previously done on 2.x hardware but have been dropped require texture duplication because without shader access they cannot be manipulated at real time. An example for this would be the invulnerability effect that has been replaced in both Doom and Heretic with a less faithful but far less resource intensive workaround. On GL 3.x hardware the proper effect can be done with the original texture and a special shader.
  • In order to use C++ version 11, which increased source code readability and flexibility, support for Visual Studio 2005 had to be dropped. As a result, Windows 9x is no longer officially supported.
  • SSE2-supporting CPU's are now required, because the true-color renderer runs very poorly without it and making the code compatible with older hardware would have involved some serious maintenance headache for a very small number of old systems.
  • Assembly instructions were removed from the software renderer because the implementation details of this code made it impossible to use with multithreaded rendering. In general the performance advantage over C++ code compiled with a modern C++ compiler was very slim at best and negative at worst. The downside, of course, is, that on old single-core systems the non-assembly implementation will be slower.
  • The "optimized" column rendering, which took advantage of a quirk in older CPU's that provided more efficient memory access, had been removed, again for source code readability - it more than doubled the size of the render code - but the main reason was that it provided no advantage whatsoever anymore on modern hardware - in fact it was slower or at best the same performance as the "unoptimized" version on any machine less than 10 years old it got tested on.

Re: Legacy Hardware and Deprecation

Sat Jun 03, 2017 7:13 pm

Adaptation is key to survival. Every four years, I find myself replacing my laptop with a newer one, roughly -- pretty cheap ones too around the $600-800 ranges. That gives me enough of a boost in power to overcome such next generation gaming requirements like Doom.

Re: Legacy Hardware and Deprecation

Sat Jun 03, 2017 7:16 pm

It's unfortunate we have to keep doing that, but I think it's pretty well proven that if you can raid computer junkyards, generally you'll find something that can support the latest GZDoom features somewhat decently. :P

If you're not the junkyard raider type, such systems generally go for roughly $50 USD on eBay, though you'll have a bit of a maintenance cost with having to replace them more often.

Re: Legacy Hardware and Deprecation

Sat Jun 03, 2017 9:38 pm

Reminds me of when I tried to do custom computer building. I realized I was way in over my head. Shaky hands and very poor dexterity make me prone to accidents with intensive labor. Pops facepalmed when I somehow accidentally snapped a part of a flimsy cpu fan off when trying to carefully lift it out, and with my fingers, it's impossible to control once its started.

And those were the days when 1gb of ram was both the norm and enormous. How laughable now.

(At any rate I don't go with desktop computers anymore because power outages often happen here without expectation a bit more often than the standard norm and too many times has my laptop batteries saved my progress from becoming dopefish crap. Plus I take my laptop almost everywhere except the obvious places that don't need it.)

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 1:21 am

I currently still run the same computer I bought in May 2012, the only change I did since then is replacing the magnetic hard drives with SSDs.
This computer still has absolutely no problems at all running GZDoom with full features enabled, despite being equipped with a mid-range Geforce 550Ti which has served me well for all those 5 years and the reason this card is going to be replaced soon has nothing to do with its performance but that it does not support Vulkan which I cannot afford anymore for non-Doom related reasons.

In any case, the fact that the current baseline for full feature support is 5-6 year old hardware should clearly show that anyone falling victim to deprecation should ask themselves why they have to stick to hardware so old that support for it is getting dropped. GZDoom isn't really that demanding, it can still run on graphics hardware from 2003 in the software renderer and from approx. 2004 with the hardware renderer. But let's be clear here: This old hardware at the lowest end of support is mere noise in the market, amounting to a market share of approx. 1%. If it wasn't for a relatively large number of badly equipped laptops from 5 years ago which came without any decent graphics support a lot more could be tossed out and discontinued - and eventually that will happen. Do not expect OpenGL 2 support to last forever. The next step will be a Vulkan renderer and after that it will sooner or later - once a sufficient number of users has migrated away from non-Vulkan-compatible hardware - mean bye-bye to OpenGL because that API imposes so many restrictions to optimization that for more complex maps it has become one of the biggest roadblocks by now.

In case you ask what features are most likely to be tossed next, here's what's currently considered deprecated and on the chopping block. As long as it remains economical, these features will stay in, but once they start getting in the way they'll be gone:

- DirectDraw is the most likely candidate. As it stands it's of little consequence but it imposes some rather stupid limitations on 2D rendering so once that gets streamlined, it will be tossed, just to keep the code sane.
- Windows XP. This depends mostly on compiler manufacturers and providers of third party libraries but with XP being officially unsupported by Microsoft it's not something that's going to last forever. It may not be obvious to the user but XP is actually quite lacking in some OS features that will pose increasing problems with development tools.
- OpenGL 2.x. The main reason it's still in is that we have no data how many users are still stuck with such hardware. Once we know a decision may be made, but it most likely will not survive adding a Vulkan renderer.

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 9:33 am

Graf Zahl wrote:mean bye-bye to OpenGL because that API imposes so many restrictions to optimization that for more complex maps it has become one of the biggest roadblocks by now.

Does this mean any custom shaders made by users will have to be redone too? (D4D's highlight monster features being a shader and all, developed by ZZYZX)

I'm also wondering if Vulkan may allow introduction of things like refraction waves? Wishful thinking, I know...

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 10:14 am

Panic attack, panic attack!!! :mrgreen: :mrgreen: :mrgreen: :twisted:

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 11:45 am

I don't really care if it breaks or not, it was only curiosity. I've found a way to make something of a 'different' wounded flash effect that doesn't require a shader which can serve as a perfect substitute easily enough.

But my question about potential ability to use refraction waves I'm still itching to know! :D

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 11:51 am

I have never used Vulkan, personally, but I know it has shaders. There exists, apparently, toolchains that can compile GLSL directly into SPIR-V shaders for Vulkan.

GZDoom's internal shaders would not undergo this, obviously, as it would be better to write native shaders directly for the new interface, but if compatibility with old mods is really a concern I don't think this will be a huge roadblock.

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 12:30 pm

The main issue is that the main shader has to interface with the texel getter function from the user shaders. This obviously means that the shaders need to be compiled at run time - at least partially. The iterations which only use stuff from gzdoom.pk3 can be precompiled, of course.

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 8:19 pm

even an usb stick computer can run gzdoom :lol:
gpu aside, I don't see any need for buying a new cpu in the last 4 years, the increase of performance is too low by the price that you're going to invest.
idk well about the gpu area, but just to compare, I have an amd hd8870m (2012) , it has the same performance as a geforce 940m (2015), and for me there's no point to upgrade my 4 years old notebook, since a notebook with the same level of gpu cost the same price that I paid my notebook + there's only dual core cpus on notebooks while mine is a solid quad core i7.
The only thing that I do belive that's gonna force me to buy another computer/notebook are the drivers, for now the intel gave up from updating my intel gpu while amd still update my gpu, as a result, with the creators update, zandronum is unplayable with the intel gpu (fixed with some hacks) and even the latest gzdoom suffers from this weird bug (almost never happens but it also affect gzdoom)

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 9:05 pm

Actually IBM, every 4 years, games get to the point where my laptops can just barely handle the new specs. Doom was the perfect example with my previous laptop, it could just barely run it at 10-30 fps. This new laptop can handle it like a champ. $700 from dell too, Black Friday sales during summer last year.

Re: Legacy Hardware and Deprecation

Sun Jun 04, 2017 9:06 pm

Major Cooke wrote:Actually IBM, every 4 years, games get to the point where my laptops can just barely handle the new specs. Doom was the perfect example with my previous laptop, it could just barely run it at 10-30 fps. This new laptop can handle it like a champ. $700 from dell too, Black Friday sales during summer last year.

Mine was the same with the new doom, but then the vulkan update came out and the fps never went below 30 *__*

Re: Legacy Hardware and Deprecation

Sun Dec 24, 2017 1:04 am

My PC is an absolute dinosaur, it has a GPU I found on eBay for around $30 (And that was a while ago) and even it can handle OpenGL 3.2 as well as DX11. As long as your PC is "new" enough to have a PCIe slot, you shouldn't have too much of a hassle finding a GPU for dirt cheap on eBay, especially if you look for AMD Cards because they tend to drop their value a lot more rapidly.