*

Author Topic: D2X-XL performance vastly improved on low end graphics hardware  (Read 13919 times)

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
D2X-XL performance vastly improved on low end graphics hardware
« 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. :)
« Last Edit: February 25, 2011, 10:26:45 AM by Diedel »

Offline Foil

  • Gold
  • ***
  • Posts: 642
  • "I've never seen its equal."
Re: [NEWS] D2X-XL performance vastly improved on low end graphics hardware
« Reply #1 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

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: [NEWS] D2X-XL performance vastly improved on low end graphics hardware
« Reply #2 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.
« Last Edit: February 25, 2011, 07:57:28 AM by Diedel »

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #3 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.

Offline TechPro

  • Lt. Commander
  • Platinum
  • ****
  • Posts: 1107
  • Where was I?
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #4 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.

Offline Kaiaatzl

  • An unusual choice for ship's cat
  • Platinum
  • ****
  • Posts: 1918
  • beware of ounce
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #5 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.

Offline Scyphi

  • Purple Heart
  • *****
  • Posts: 2386
  • TechPro Jr.
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #6 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. :)
"I thought I had a great idea, but it never really took off. In fact, it didn't even get on the runway. I guess you could say it exploded in the hanger." -Calvin and Hobbes
Check out my deviantART

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #7 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.

Offline TechPro

  • Lt. Commander
  • Platinum
  • ****
  • Posts: 1107
  • Where was I?
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #8 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 ...

Offline Scyphi

  • Purple Heart
  • *****
  • Posts: 2386
  • TechPro Jr.
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #9 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. :)
"I thought I had a great idea, but it never really took off. In fact, it didn't even get on the runway. I guess you could say it exploded in the hanger." -Calvin and Hobbes
Check out my deviantART

Offline TechPro

  • Lt. Commander
  • Platinum
  • ****
  • Posts: 1107
  • Where was I?
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #10 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.  ;)

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #11 on: March 01, 2011, 09:28:36 PM »
I am sure that you can conduct your private discussion ... privately, if not face to face.

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #12 on: March 02, 2011, 01:30:53 PM »
TechNor,

is the flickering walls problem still there?

Offline Kaiaatzl

  • An unusual choice for ship's cat
  • Platinum
  • ****
  • Posts: 1918
  • beware of ounce
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #13 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.

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: D2X-XL performance vastly improved on low end graphics hardware
« Reply #14 on: March 02, 2011, 03:21:07 PM »
Good to hear!

And bad ... :P

 

An Error Has Occurred!

Cannot create references to/from string offsets