narzoul / DDrawCompat

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

Performance issues #147

Closed Matthaiks closed 1 year ago

Matthaiks commented 1 year ago

There's something wrong with v0.4.0. For instance, the map scrolling in Planescape: Torment (with the hi-res patch) is not smooth and the framerate sometimes drops below 30 FPS (standard framerate). In Blood 2, the framerate is high but the mouse movement is not smooth. Changing DDrawCompat's settings does not help. v0.3.2 runs fine.

Windows 10 21H1, Radeon Vega 8

narzoul commented 1 year ago

I don't see any of those issues on my dedicated AMD GPU (at least in the starting areas), but I don't have an integrated AMD GPU to check at the moment. How do you see the framerates?

Can you upload debug logs from Torment scrolling around for a while (5-10 seconds) with the Release build of v0.4.0? Press Alt+F4 immediately afterwards and exit the game that way, so that I know which part of the log to check. Please use only the default settings for this (except for LogLevel=debug). Repeat with the ReleaseWithDebugLogs build of v0.3.2 for comparison.

Matthaiks commented 1 year ago

How do you see the framerates?

Bandicam

Logs: v032_DDrawCompat-torment.zip v040_DDrawCompat-torment.zip

narzoul commented 1 year ago

Thanks! I can see some dips in FPS with Bandicam in Torment now. The difference seems to be caused by doing blits on GPU vs CPU in the old version. I have no idea yet why CPU is faster, but here's a test version that does all blits on CPU: ddraw.zip (diff.txt compared to v0.4.0)

Not sure if it will make any difference in Blood 2, but please try that one also (menu isn't visible with Bandicam for some reason).

Matthaiks commented 1 year ago

The test version is like v0.3.2 in Torment, but now Blood 2's dynamic lighting (light mapping) kills the framerate (like with older versions of dgVoodoo2).

narzoul commented 1 year ago

Does that require a specific map or something? Do you have a save game I could check?

Matthaiks commented 1 year ago

The first level, moving subway lights appear from time to time.

narzoul commented 1 year ago

Another attempt: ddraw.zip (diff.txt compared to v0.4.0)

With this, the framerate is about the same for me as with v0.3.2. I wonder if it also solves your mouse issues.

Matthaiks commented 1 year ago

Yes, it seems to working fine now. Thanks!

narzoul commented 1 year ago

Ok, thanks! I don't like it as a final solution, though. I might add it as a config option if I don't find anything better. But I'd rather find out why GPU blits are slower than CPU blits, because that makes no sense to me.