Planet Descent

From the Front Page => News Board => Topic started by: karx-elf-erx on February 25, 2011, 06:44:49 AM

Title: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on February 25, 2011, 06:44:49 AM
I have finally had the occasion to debug D2X-XL on some low end graphics hardware (Intel IGP) and look into why it was so unbearably slow there even with shader usage turned off or pureD2 mode enabled.

It turned out that using a single graphics driver function was the culprit. Loading the depth buffer on weak graphics hardware can take about a quarter of a second. Now D2X-XL uses this feature extensively for improving transparency rendering by applying some soft blending with opaque geometry. This means that you are down to less than 4 fps whenever D2X-XL needs to read the depth buffer for a couple of frames (or longer).

Fixing this was very easy. D2X-XL will now do some performance measurements when using this function for the first couple of times, and if it proves to be too slow, all functions relying on it are turned off (apart from corona rendering these are mainly used for soft blending smoke particles, explosions and energy sparks - something that only works fast enough on high end hardware anyway).

Now this is already good news. What makes it even better though is that you can now keep shader usage enabled on low end graphics hardware and enjoy all the other benefits of it, like lightmap based lighting and other prettifications D2X-XL applies. :)
Title: Re: [NEWS] D2X-XL performance vastly improved on low end graphics hardware
Post by: Foil on February 25, 2011, 07:22:55 AM
OOoooh, excellent!

Now D2X-XL should be considerably more accessible.  That's huge news, D.  Thank you!! :D
Title: Re: [NEWS] D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on February 25, 2011, 07:33:38 AM
I had never quite understood why D2X-XL worked so bad on such hardware; but depth buffer reads had been a real performance killer years ago, and remembering that it is quite clear why D2X-XL had such problems. I am more than glad I could finally work this out. :)

Btw, another thing I have managed to fix was audio not being available on Linux when SDL was trying to use pulse audio and wasn't able to open it. D2X-XL will now try to fall back to alsa which should work in (as good as) all cases.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on February 26, 2011, 09:44:14 AM
The depth buffer read performance issue has been further relieved by D2X-XL only reading the depth when it has determined that rendering elements of the current frame actually requires depth buffer information (coronas, glow, soft blending). That means that just turning off coronas, glow and avoiding using the highest render quality (which enables soft blending) may already cure any performance problems you are having while allowing you to use all the other effects and goodies D2X-XL offers.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: TechPro on February 27, 2011, 02:18:26 PM
Holy crap that improved the performance immensely!   8) 8)  The pyro feels like a silky smooth rocket!  Was loads of fun just to play!  For the very first time ever, I was able to play Descent on my laptop at 1280x800 without any performance loss (previously 640x480 was best with 800x600 pushing it). Very, very nice work!  (my hat is off in a salute to you)  :)

I did run into a couple issues (sorry), one of which may be entirely due to the video card in use.  I'll post bug reports on Sourceforge for you.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Kaiaatzl on February 27, 2011, 05:41:01 PM
Now I must try this version, from the version history I can predict there won't be any serious singleplayer bugs, and I can't think of anything multiplayer related that remains unfixed :D.
Sounds the D2X-XL "experience" has reached a whole new level.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Scyphi on February 28, 2011, 06:17:41 AM
It was such a performance improvement, that it (nearly) ran on my laptop. The menus looked REALLY nice...but that wa about as far as we got with it. :P Stupid non-gaming machine...

Ah well, I'm not too worried about it, soon I'll be getting a new, better, laptop. :)
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on February 28, 2011, 06:28:27 AM
Try to add '-use_shaders 0' to config/d2x.ini.

D2X-XL runs quite well on a machine with Intel IGP now for me.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: TechPro on February 28, 2011, 04:44:46 PM
It was such a performance improvement, that it (nearly) ran on my laptop. The menus looked REALLY nice...but that wa about as far as we got with it. :P Stupid non-gaming machine...

Ah well, I'm not too worried about it, soon I'll be getting a new, better, laptop. :)
I think I have some ideas about what we can try ...
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Scyphi on March 01, 2011, 05:55:26 AM
Yes, but...

Quote from: Myself
I'm not too worried about it, soon I'll be getting a new, better, laptop. :)
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: TechPro on March 01, 2011, 08:42:07 PM
Yes, but...

Quote from: Myself
I'm not too worried about it, soon I'll be getting a new, better, laptop. :)
Spoil sport.  ;)
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on March 01, 2011, 09:28:36 PM
I am sure that you can conduct your private discussion ... privately, if not face to face.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on March 02, 2011, 01:30:53 PM
TechNor,

is the flickering walls problem still there?
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Kaiaatzl on March 02, 2011, 02:23:26 PM
I had been having the flickering wall problem too and it's completely gone in version .139.
I've found another minor graphical bug that's more funny than anything else.  I'll report it when I get back from flyer delivery.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on March 02, 2011, 03:21:07 PM
Good to hear!

And bad ... :P
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Kaiaatzl on March 02, 2011, 04:20:16 PM
It's so obscure and harmless that it could go in the category of: "it's not a bug, it's a feature".

I'm writing the bug report now.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Scyphi on March 02, 2011, 08:12:41 PM
Save these little issues, however, judging from what I've seen, though, this has been a huge step forward for D2X-XL, Diedel, FYI. :D
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: PyroJockey on March 03, 2011, 06:51:47 AM
I'm looking forward to trying this new version. Thanks Diedel!  :D
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: TechPro on March 03, 2011, 09:14:56 PM
TechNor,

is the flickering walls problem still there?

Adding '-use_shaders 0' to config/d2x.ini didn't make any difference.  Sorry.

Here is a short video showing the flicker:  http://www.filedropper.com/d2x-xlflicker  (running D2X-XL ver 1.15.135)

I just (today) had the chance to try your newest version (ver. 1.15.141) ... and still flickers.

Other than the flicker, the program seems to run great.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: karx-elf-erx on March 03, 2011, 11:05:59 PM
Why didn't you put it on Youtube? Because you didn't want to embarrass me? :D

Edit:

Ok, I got it. That looks bad. Haven't seen something like that myself so far though.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: TechPro on March 04, 2011, 05:50:18 AM
I still have some testing to do.  Going to try a fresh install on a different system and if that installation doesn't flicker, I'll copy it to the flickering system and see what happens.  Hopefully, if the flicker is due to the video card being used ... I should know it then.
Title: Re: D2X-XL performance vastly improved on low end graphics hardware
Post by: Scyphi on March 04, 2011, 06:29:13 AM
Quote
Why didn't you put it on Youtube?

I would imagine it's because he doesn't have an account on Youtube. Nor any reason to need one for that matter.