iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
272 stars 23 forks source link

Halo CE fps drops when particles are enabled, only occurs on wine-nine #85

Closed ghost closed 3 years ago

ghost commented 4 years ago

The frame rate drops severely in Halo CE (2001) when I enable "Particles" in the video settings menu when using wine-nine. Particles are generated when there is an in-game explosion, and when an explosion occurs there is a sudden drop in frame rate. There is no drop in frame rate when an explosion occurs if I disable the Particles setting, a slight drop if I set Particles to Low, and a large drop if I set it to High.

This issue only occurs in wine-nine, regular wine does not have a severe frame rate drop when there are particles. It occurs regardless of other visual settings or screen resolution. There is no throttling taking place when this occurs (CPU and GPU power management disabled).

The game runs much faster in wine-nine than under regular wine, especially on large custom maps. I normally play the game with fps capped at 60 using Chimera, and can reach 20fps or even lower when many explosions are present. Otherwise, the game runs at a smooth 60 even on large custom maps (something regular wine can't do).

Unfortunately I am unable to do an apitrace for Halo CE, the trace plays back with a black screen and buffer overflow errors. The exact issue has already been reported to apitrace developers in 2016, and has not been fixed.

Log:

GALLIUM_HUD=fps,cpu0+cpu1+cpu2+cpu3,GPU-load wine haloce.exe 
008c:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000142
0024:err:winediag:wined3d_dll_init Setting multithreaded command stream to 0x1.
Native Direct3D 9 v0.7.0.368-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
0024:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.
Native Direct3D 9 v0.7.0.368-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
Using profile path .
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0xd2f508), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0xd2f508), stub!
Loading font fonts\Hack-Bold.ttf...done
Loading font fonts\Interstate-Bold.ttf...done

My system runs Ubuntu 18.04, with wine 5.10 staging and the latest 0.7 wine-nine. GPU is an AMD HD6670 (Mesa 20.0.8, Radeon driver). This hardware would have no problem playing Halo CE maxed out on Windows.

I'm happy to provide additional info if needed. Thanks!

dungeon007 commented 3 years ago

csmt off actually gives big boost on this one, i was using csmt off with mine hack too... speed is the same as with mine hack. csmt on going down to 6 fps at worse there, csmt off 20 fps at worse. .Or where it was 20 fps now there are 130, etc... i mean perf is the same as mine hack, so that is it.

dungeon007 commented 3 years ago

Could be all that these simple SVF D3D8 apps all dislike second thread, something like that happens there 🤣

axeldavy commented 3 years ago

It's simply the proposed implementation is not friendly with csmt + frequent locks without NOOVERWRITE. It's possible to make it friendly, but I don't think it's worth the effort. I'll just disable csmt when full vertex software processing is activated.

dungeon007 commented 3 years ago

"I'll just disable csmt when full vertex software processing is activated." Yep do that, in mine experience these are always faster with csmt off. In this worst case scenario even goes double/triple faster with csmt off.

axeldavy commented 3 years ago

@dungeon007 Alright, why stop when you can achieve perfection ? Please retry performance of phantasmat and the other d3d8to9 games with the new patches of the ixit tree. https://github.com/iXit/Mesa-3D/commit/23933d8d0bfe82b19685d5e14662c8e64eed07e1 https://github.com/iXit/Mesa-3D/commit/43333fd123a33459f097df19173b9232aeeb5edf

Now works fine with csmt thread :-) Try on/off see if you get a boost. I wonder if we can get more than the 20 fps you said.

dungeon007 commented 3 years ago

On Phantasmat, 21 fps now csmt off and 34 fps csmt on. So, that is now near native D3D8 SVP speed there of 36 fps. Great! Or 78 times more speed of dxvk 🤣 Joking a bit, wont have more time to test else apps, maybe later on, but i expect it wont be so huge, that was just worse case scenario.

dungeon007 commented 3 years ago

So you closed this. Just to note csmt helps to other apps that use this about 15% to 25%, as what csmt usually do, so it is good to go now with csmt on.

axeldavy commented 3 years ago

Well I closed because problem fixed and fix merged.

dungeon007 commented 3 years ago

Correct thing, now just lets hope it wont be some kind of regressions out of all this in a wild, as we never know and could really test everything. 🤣