Patreon Logo Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal Logo PayPal. You can also buy games using our partner links for GOG and Humble Store.
Title: Wine "PBA" - A new project for better Direct3D over OpenGL
Page: 1/4
  Go to:
Avehicle7887 24 Feb 2018
Posting this here for more awareness and contribution: https://www.phoronix.com/scan.php?page=news_item&px=Wine-PBA

The project was started by University student Andrew Comminos which improves Wine performance. A new Staging branch based right off 2.21 has been added which you can find at this link: https://github.com/acomminos/wine-pba

I've tried to build it from source however it aborts a few steps through the process, the error has been reported already, hopefully will be fixed soon.

You can also read more on the author's personal blog: https://comminos.com/posts/2018-02-21-wined3d-profiling.html

Huge thanks to Andrew for his work and to Phoronix for bringing this in the spotlight. :-)
PlutonMaster 24 Feb 2018
I've found this from Phoronix website. Looks promising.
Avehicle7887 24 Feb 2018
Post Update -

I gave this patch a spin earlier yesterday morning, Downloaded Base Wine 2.21 > Applied Staging 2.21 patches > Applied Andrew's patch. Didn't have much luck. Games ran, sound audible but with a black screen.

I recompiled it again using latest patches, black screens are gone and there are some serious improvements this time (also a regression):

External Media: You need to be logged in to view this.


As you can see above, Witcher 3 improved a lot for Nvidia, however all the characters (including Geralt's horse) are invisible. Also noticed an important factor - my GPU usage peaked to about 80%.

Will keep posting with updates :)

For the moment I can't seem to manage to build a WoW64 Wine build (32+64bit combo) so all my tests will either be a Pure 32bit or 64bit build.
Shmerl 25 Feb 2018
I wonder if there is any work duplication going on, since Wine developers are now also working on fixing buffer pool performance.
GloriousEggroll 25 Feb 2018
This also needs to be tested on AMD gpus. My experience on AMD gpus with these patches was atrocious sadly. My wow framerate droped from 60+ to about 10-20 in sunstrider isle newbie area with dx9 and dx11
sterky 25 Feb 2018
Hey. I also gave these patches a run, but with League Of Legends.

Quick summary here:

staging-2.20 avg: 83.83
staging-2.21 avg: 83.65
staging-2.21+pba patches avg: 104.77


Links to plotted fps graphs etc are in reddit post:
[Link to my Reddit post](https://www.reddit.com/r/leagueoflinux/comments/801er5/testing_of_winepba_patches_gives_some_nice_fps/)
tpau 25 Feb 2018
Quoting: ShmerlI wonder if there is any work duplication going on, since Wine developers are now also working on fixing buffer pool performance.
Have you asked the wine developers and the pba guy this? It might make more sense on #winehackers or wine-devel than here to wonder about it.
andda715 25 Feb 2018
Tested on TW3 w R1700 och GTX1080:

 ~7 fps wine master latest
~20 fps wine master latest with (new) buffer patch
~20 fps wine staging 2.21
~13 fps wine staging 2.21 with PBA patches


PBA patches gives invisible Geralt etc as already reported (using 4 from: ae1cb0d Fix constant buffer invalidation).
Not sure why the Nvidia performance improved so much for Avehicle7887 but not for me. :-/
sterky 25 Feb 2018
Rebuilt wine-pba with latest patches and ran League Of Legends again, same test full bot game.
It was a bit shorter game tho but i did see around 100-130 fps most of the time.

staging-2.20 avg: 83.83
staging-2.21 avg: 83.65
staging-2.21+pba patches avg: 104.77
staging-2.21+pba patches (rebuild with latest) avg: 113.23  


[link to plot](https://imgur.com/7XWSJXR)
Avehicle7887 25 Feb 2018
I have re-tested Witcher 3 under different CPU cores active, using just the first 4 cores produced almost same performance as running on all 16 threads. GPU load peaked 83% usage in about 10 mins of gameplay. I'm in the process of building the 32bit Wine version atm, so I can do more tests.
Shmerl 25 Feb 2018
Quoting: tpauHave you asked the wine developers and the pba guy this? It might make more sense on #winehackers or wine-devel than here to wonder about it.
Someone already asked this question in this bug: https://bugs.winehq.org/show_bug.cgi?id=42592#c75
Avehicle7887 25 Feb 2018
Ran a few more tests:

Guild Wars 2 - My "usual" testing area is back to 80+ fps, in other areas where fps used to dip mid 20's is now 32-40 fps. Turning the camera now longer drops the frame rate or stutters (have yet to test in normal gameplay hours). Virtual Memory usage is increased. - Updated report below.

Path of Exile - The 32bit version of the game, stutters and throws random errors, also with this patch it runs out of Virtual Memory (4GB Limit) in less than 10 minutes whereas without, it takes like 3-4 hours to reach the limit. Couldn't get the 64bit version to run. - Updated report below.

I'm pleased with GW2 however, I'm noticing a pattern here, Virtual Memory usage increases a lot with this patch and that's not good for 32bit programs in Wine, as I also reported yesterday Witcher 3 was reporting 51GB VM usage. For 64bit games this shouldn't be an issue but 32bit ones are prone to crash sooner than usual.
tpau 25 Feb 2018
Quoting: ShmerlSomeone already asked this question in this bug: https://bugs.winehq.org/show_bug.cgi?id=42592#c75
I can't see that it is about duplicated work, just about Witcher performance
Shmerl 25 Feb 2018
Quoting: tpauI can't see that it is about duplicated work, just about Witcher performance
Here is the question:

Buffer maps.. Is that any related to the new wine-PBA work?
So it is exactly about the topic above.
Avehicle7887 26 Feb 2018
First of all, I'd like to say thanks again to Shmerl for helping me with a few last standing Wine issues earlier today.

I just gave Guild Wars 2 a good 2 hours test run, including one of the most popular and CPU intensive events in the game (Tequatl for those familiar with the game). This is based after my long time experience of running the game under Wine Staging 2.0 where it was the best and last version for playing this game under Nvidia....until today.

First thing you'll notice with PBA is that the game allocates 3.7GB Ram right away - Up to 2 hours of gameplay it peaked 5.1GB which I find 'acceptable'. In the usual game hubs framerate improved by about 10-15 fps, turning the camera remains smooth and no stuttering is present. In instances it's even better, framerate is overall the same as 2.0-Staging but fps keeps steady and again no stuttering.

The Big One - One of the game's most popular events (Tequatl) includes over a 100 players battling a boss, this is a common place for fps drops and getting below 20fps here can be easily achieved. I used same settings as always for comparison. Right off the bat the stuttering was gone, and when lots of players were on the same spot it didn't drop the frame rate to the usual 5-8fps crawl, instead it remained smooth the whole time. This was HUGELY much better than 2.0-Staging, overall throughout the whole fight it maintained a solid 25-40fps while remaining smooth during the heavy parts. ---- There are other areas and events where many players are together, this was just one example.

--------------------------------------------

As for other games tested:

Crysis Warhead (64bit) - 1920x1080 / Full Enthusiast Settings (Very High) + Gamer Shadows (High) / 2x AA / Motion Blur off. Framerates were in the 70-100 mark, except a few dips to mid 60's and occasionally 45. No Stuttering at all was present. Feels much better than normal Staging / CSMT.

Path of Exile - This one you need to use the 64bit Client if you want PBA otherwise Virtual Memory hits 4GB and crashes. I used to run this with Wine_Dev_3.2 and normal CSMT and got about 100fps max / with PBA I'm getting about 143 now, overall better but not strictly needed.

Conclusions: So far Guild Wars 2 benefitted a lot from this patch and although it allocates a lot of memory right from the beginning, I think the trade-off for much better performance is worth it.

If you wish to give this build a try I uploaded it to my google drive: [Download Link](https://drive.google.com/open?id=1TdFwaZ7juoiPawa9d2TCz3i7xZ9vswmR)

-------------------------------------------------------
My Guild Wars 2 Settings:

External Media: You need to be logged in to view this.


Registry Settings File (Adjust memory size to your GPU):

REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"CSMT"="enabled"
"DirectDrawRenderer"="opengl"
"StrictDrawOrdering"="disabled"
"UseGLSL"="disabled"
"VideoMemorySize"="6144"
Also launch game with the "-dx9single" parameter for better performance.
adamhm 27 Feb 2018
Quoting: Avehicle7887Registry Settings File...
To enable CSMT you should use:

"csmt"=dword:1
As per https://wiki.winehq.org/Useful_Registry_Keys

Or for Wine Staging:

[HKEY_CURRENT_USER\Software\Wine\DllRedirects]
"wined3d"="wined3d-csmt.dll"
Avehicle7887 27 Feb 2018
Quoting: adamhm
Quoting: Avehicle7887Registry Settings File...
To enable CSMT you should use:

"csmt"=dword:1
As per https://wiki.winehq.org/Useful_Registry_Keys

Or for Wine Staging:

[HKEY_CURRENT_USER\Software\Wine\DllRedirects]
"wined3d"="wined3d-csmt.dll"
I know about those. I'm not sure why I even use that key at all, 2.21 Staging already comes with the Dllredirect pre-set, I guess I just wanted to be on the safe side and be like "You hear CSMT? you must BE on!" :-) Thanks though, I guess I should omit such parts during guides.
adamhm 28 Feb 2018
Quoting: Avehicle7887...2.21 Staging already comes with the Dllredirect pre-set...
2.21-staging doesn't pre-set it (or at least it doesn't here)...? AFAIK CSMT is only enabled by default as of Wine 3.2
Avehicle7887 28 Feb 2018
Quoting: adamhm
Quoting: Avehicle7887...2.21 Staging already comes with the Dllredirect pre-set...
2.21-staging doesn't pre-set it (or at least it doesn't here)...? AFAIK CSMT is only enabled by default as of Wine 3.2
Ah sorry I miswrote that, I meant that if you enable CSMT through the config UI in 2.21-Staging, then you don't need to create the CSMT key in regedit. My mistake :-)
coeseta 28 Feb 2018
Oh the GW2 improvements sound really interesting, so far I have spent ~6400 hours ingame via wine on Linux :)
I will test it and report back :D
I hope this version will be also added to PoL for convenience :P

Thank you very much for that test and effort Avehicle7887 .
Avehicle7887 1 Mar 2018
Quoting: coesetaOh the GW2 improvements sound really interesting, so far I have spent ~6400 hours ingame via wine on Linux :)
I will test it and report back :D
I hope this version will be also added to PoL for convenience :P

Thank you very much for that test and effort Avehicle7887 .
I have just updated the link to a newer Wine build in the post above, it is a lot more memory friendly (by more than 1GB less usage).

More Guild Wars 2 tests (copied from my earlier report on github):

I Ran the test with GW2 on an i5-4590 / 8GB Ram / GTX 960 384.111 / Using latest PBA. Didn't notice any performance loss compared to my previous build. To say I went from 16 threads Ryzen 1700X to a quad core, the fps difference was minimal, in action areas such as fractals it did quite well at keeping that 42+. I'm very happy with the results.

I've also did Tequatl tonight with the i5 system, the frame rate was pretty good considering the amount of players during that event. I didn't experience any stutters even when the fps was down to 20, average 25-30 during the event.

Usages throughout the tests:

CPU: About 45% on 3 cores, 100% on the 4th.
GPU: 57% Peak, with about 31% Memory used (2GB Card)
RAM: (about 45mins Including Tequatl) game was only occupying 3.3GB

The Highlight of this build: The ram usage went down by at least 1GB and the at the end of the test the total difference compared with the old one was 1.4GB, meanwhile the performance remained the same for the most part (I did notice a slight fps increase with the Ryzen build though). The cores are also being utilized better, before with Staging 2.0 it was 2 cores at like 100% while the other 2 relaxed.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon Logo Patreon. Plain Donations: PayPal Logo PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register