acomminos / wine-pba

Patches to add a persistent buffer allocator for faster dynamic geometry in Direct3D games.
GNU Lesser General Public License v2.1
138 stars 6 forks source link

Black screen with cursor on 3.2 staging sha: f9e1dbb83d850a2f7cb17079e02de139e2f8b920 #3

Closed GloriousEggroll closed 6 years ago

GloriousEggroll commented 6 years ago

Hi, so I was curious to test these changes with staging on 3.2-staging. I modified them so that they apply cleanly and compile, however most games either just show a black screen with cursor or crash. (wow had a working glove cursor). I've attached the patches. They can be used with http://github.com/wine-staging/wine-staging and wine-mirror/wine checked out with this sha1: f9e1dbb83d850a2f7cb17079e02de139e2f8b920 (latest staging is rebased on this commit.)

https://github.com/GloriousEggroll/wine-staging-acomminos

acomminos commented 6 years ago

Thanks for this!

I've noticed the black screen issue too with running WoW in D3D11- I plan on looking into that soon. Have you tried running in D3D9 mode?

GloriousEggroll commented 6 years ago

i did and was able to run it, however with the patches my framerate tanked to about 30+ fps. without it i was around 90-100+fps. in sunstrider isle on vega 64

acomminos commented 6 years ago

Interesting. Can you post a symbolicated profile? I wonder if mesa's keeping the buffer in host memory.

GloriousEggroll commented 6 years ago

Sorry I'm unfamiliar with how to do this. I'd be glad to if I knew how

IngeniousDox commented 6 years ago

I had grabbed the patches and applied them to Staging 2.21 last night, but I couldn't get them link for Biarch Ubuntu. Though with just the 64 bit part, I was able to directly start WoW, but had black screen aswell. I poked Eggroll to get them building for Wine Staging, only to find out this morning he got black screen aswell. Since DX9 client for WoW is broken (missing ground spell effects) I figured you had used DX11 yourself, so I never tested DX9.

I did now and just for the sake of some quick testing, I found a spot on top of Suramar, and quickly eyeballed fps in various configs:

Staging 2.21 DX11: 42 fps (CSMT disabled since it lowers fps)
Staging 3.2 DX11: 18 fps (CSMT disabled since it lowered fps)

Staging 2.21 DX9: 48 fps (CSMT disabled since it lowers fps)
Staging 2.0 DX9: 82 fps (CSMT enabled)

Staging 2.21 PBA / DX9: 90 fps (CSMT enabled)

So, I'm really looking forward to it if you can get this working for DX11. Since this truly increases fps back to (and above) Staging 2.0 times.

acomminos commented 6 years ago

Yup, my first priority is getting d3d11 working. The only issue with it is implementing persistently mapped uniform buffers (just need behind-the-scenes buffer alignment to GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT).

I've got a super hackish fix running locally already, should be ready by tomorrow.

IngeniousDox commented 6 years ago

Ok, nuked my build lxc, and started it fresh, now it links. Blizzard App starts, but still crashes, but I read that the app uses DX11 now aswell, so lets ignore that for now. I can still start WoW directly.

I'll test again when your fix is in.

acomminos commented 6 years ago

Black screen issue should be fixed with 607607b7c2702f145b1a400ebfaa9d742b85a847.

Looks like there's significantly more heap contention on D3D11 WoW from some initial profiling- looking into this, might benefit a lot from segregated free lists.

IngeniousDox commented 6 years ago

Right, compiling and testing.

IngeniousDox commented 6 years ago

Results: DX11 works!

However, fps starts out semi-ok, and then plunged to sub 10 fps, and it keeps getting lower and lower over time.

Retested it with DX9 to see if the issue is now happening there as well, just in case, but it does not.

GloriousEggroll commented 6 years ago

Alright so update: 3.2-staging: DX11 launches, 10-20 fps, DX9 also has the same very low fps. 2.21-staging: DX11 "World of Warcraft was unable to start up 3D acceleration", DX9 loads but has low 10-20 fps

I'm wondering if this is a mesa vs nvidia bug, as Dox uses nvidia and I use amd with latest mesa 17.3.5

jrugia commented 6 years ago

Just rebuilt 2.21 again with newest patches. Can confirm the Black Screens I was having in Witcher 3 are gone, however the characters are now all invisible.

Performance-wise, the game improved by as much as 15-20fps depending on gameplay and the GPU usage sky-rocketed to 80% (Screenshot in thread below). I also noticed the game was "using" 51GB of Virtual Memory.

I'm running several tests, trying to log them on this thread: https://www.gamingonlinux.com/index.php?module=viewtopic&topic_id=3199&page=1

Tomorrow I will run a few DX9 32bit tests.

mrdeathjr28 commented 6 years ago

https://i.imgur.com/jbUNMvn.jpg

Very impressive results 36fps to 51fps and with slow single thread cpu as ryzen, with coffelake (i5 8600K) must be up more and oc more

This patch confirm gpu use on nvidia is lower, in my case appears this situation too

Almost forget how many cores used and core 0 and 1 at 100% still appear ?

thrimbor commented 6 years ago

Results: DX11 works!

However, fps starts out semi-ok, and then plunged to sub 10 fps, and it keeps getting lower and lower over time.

Retested it with DX9 to see if the issue is now happening there as well, just in case, but it does not.

4790k + GTX 970 here, and I had similar experiences trying out 2.21-staging vs 2.21-staging+PBA. Had around 27 fps with both APIs in Dalaran, with these patches applied I'm getting 59 in D3D9. D3D11 however dropped to 20, only to drop gradually to 3 after a few seconds.

While improved D3D9 performance is nice, it's not that useful when raiding in WoW - its D3D9 renderer has been broken for a while now (invisible ground effects in Antorus), it even issues a warning at launch now when not using D3D11.

acomminos commented 6 years ago

The main issue with D3D11 right now is that uniform buffers (which aren't used on D3D9) are discarded far more frequently than vertex/index buffers. The simple heap implementation can handle this (much improved by rounding allocations to the nearest power of two, reducing fragmentation), but the issuance of an insane amount of fences causes a large slowdown in the NVIDIA GL driver.

I should be able to fix this by reducing our fence usage, likely by sharing one sync object for all buffers involved in a draw call.

jrugia commented 6 years ago

I'm not sure where the "general discussion" section is on Github (still new here), however I'm leaving my PBA-related findings here: https://www.gamingonlinux.com/index.php?module=viewtopic&topic_id=3199&page=2

acomminos commented 6 years ago

I'm not sure where the "general discussion" section is on Github (still new here), however I'm leaving my PBA-related findings here: https://www.gamingonlinux.com/index.php?module=viewtopic&topic_id=3199&page=2

Thanks for this, this is useful data (for the record, there is no general discussion section- I may create a wiki, though).

acomminos commented 6 years ago

Alright, the latest update in the patch series is a lot of fun.

Let me know how this works out for you guys!

acomminos commented 6 years ago

I'll be focusing on D3D11 performance from this point forward, given that it's at a point where it's a playable default.

IngeniousDox commented 6 years ago

I figure it might handy to just make issues on github / game with tests results. So you keep your info here, and you don't have to look at multiple sites for it.

I started 1 for World of Warcraft here: https://github.com/acomminos/wine-pba/issues/7

GloriousEggroll commented 6 years ago

As of latest commit 1bc7015ad8b1ef6807886248d3af2a5293df8b4e, MASSIVE improvement on amd!! getting between 100-200 fps while idling in sunstrider isle, will run some tests later tonight after work!

acomminos commented 6 years ago

I'm going to close this issue, since most further discussion probably belongs in #7.