narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
878 stars 67 forks source link

Performance regression since 0.3.2 (and nGlide) #331

Open PlayNeth opened 1 week ago

PlayNeth commented 1 week ago

Been testing DDC for the past few years on a variety of hardware and Windows versions for bug reporting purposes and there is a common theme I noticed: 0.3.2 seems to be the most performant and compatible version in my experience.

I don't know why that is but it affects pretty much every game including software rendered ones like Need for Speed II, losing as much as 20 fps on my sisters laptop (potato Celeron) with the latest version. Pairing it with nGlide used to work like bread and butter as well, ironing out stutters in NFS II's Glide mode, now it just black screens.

So my question is: Is it intended behavior? DDC has come a long way since then and is now packed full of features, could it the processor not cutting it anymore? Also I recall reading about an issue here last year about an unknown problem with the rendering of Blits on the GPU leading to worse performance in general, could that be it?

narzoul commented 1 week ago

losing as much as 20 fps

Compared to what?

Also, how do you measure FPS? I found most 3rd party software to give incorrect or misleading numbers with DDrawCompat, and the numbers they give may also change due to some underlying changes in how presentation is handled by both the game and DDrawCompat, even if the actual performance isn't really different.

Pairing it with nGlide used to work like bread and butter as well, ironing out stutters in NFS II's Glide mode, now it just black screens.

Glide is not supported, neither is pairing DDrawCompat with other wrappers (this is mentioned in the readme).

So my question is: Is it intended behavior?

I think the answer to that is pretty obvious...

Also I recall reading about an issue here last year about an unknown problem with the rendering of Blits on the GPU leading to worse performance in general, could that be it?

I doubt it, as this wouldn't affect "every game".


In general, this is a very complicated topic and difficult/time-consuming to investigate. I've spent many, many hours trying to find why e.g. Empire Earth runs more efficiently natively, trying to find which commits may have made it slower, but even after hundreds of tests, the results are inconclusive, partly due to the already present performance fluctuation in the game which makes different runs produce different results.

Some other notes:

PlayNeth commented 1 week ago

Compared to what?

0.3.2 versus 0.5.2. As for the way I measured the FPS I went by purely eyeballing it with 0.3.2 (adding an extra layer on top on this thing wouldn't be pretty smart) but it's definitely noticeable. Former I get a pretty silky smooth frame rate while the latter is like a fluctuating 30-40ish FPS reported by the overlay.

Glide is not supported, neither is pairing DDrawCompat with other wrappers (this is mentioned in the readme).

Got it. Just felt it was worth mentioning since even Glide stuff uses some aspects of DirectDraw and benefit from 0.3.2 and earlier versions of DDC in some way, at least on the hardware I've tried.

I think the answer to that is pretty obvious...

Yep. Asked just in case but I just love tinkering with older hardware lol.

Some other notes:

Did and done that. NFS II is one of those stubborn games that basically won't boot at all without locking it to a single core, same goes for DisplayResolution (gamble whether it boots), so all my tests have them set to 1 and app respectively.

Duly noted. I very much thank you for the tremendous effort you put into the wrapper as its basically my favorite project on the site as I mainly play older games and try it on basically everything I get my hands on.