doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.2k stars 851 forks source link

[d3d9] Metal Gear Rising Revengeance: Severe performance hit with MSAA antialiasing #1653

Closed ryester19 closed 1 year ago

ryester19 commented 4 years ago

Software information

Metal Gear Rising: Revengeance Arch Linux

System information

Apitrace file(s)

https://mega.nz/file/HoBTxQBa#wbBApnWo9C1xbV0CCHk3-_8JOYP3wSN-tABfGo1Ttpk

Log files

steam-235460.log


When compared with WineD3D, DXVK takes a much heavier performance penalty when using the in-game MSAA antialiasing option.

The following framerate averages were roughly estimated using MangoHUD. They were recorded while at the beginning of the 1st training VR mission stage. The apitrace above was also recorded in this same stage.

WineD3D: 8x MSAA: 53fps 4x MSAA: 60fps 2x MSAA: 60fps No MSAA: 60fps

DXVK: 8x MSAA: 34fps 4x MSAA: 50fps 2x MSAA 60fps No MSAA: 60fps

doitsujin commented 4 years ago

Do you have a rough idea how the game performs on Windows?

I know the game is fairly old at this point and should run well on pretty much anything (played it on a GTX 670 back in the day), but wined3d isn't necessarily a valid comparison since MSAA is straight-up broken there in some cases. It'll give you multisampled image but always sample at pixel center, which makes a massive difference in performance.

ryester19 commented 4 years ago

Do you have a rough idea how the game performs on Windows?

I do not, but a quick search on the Steam forums shows that MSAA is a big issue for many people. I won't have a Windows PC until September, in order to check for myself.

Is it possible that WineD3D is faster just because it's not rendering the in-game MSAA implementation correctly? Sounds like this issue will either be a dirty hack or won'tfix

doitsujin commented 4 years ago

I might do some testing later, I do have the game. The apitrace is broken on wined3d so not sure if MSAA works with wined3d in this game or not, but in some games (like ToCS3) it clearly doesn't.

ryester19 commented 4 years ago

I might do some testing later, I do have the game. The apitrace is broken on wined3d so not sure if MSAA works with wined3d in this game or not, but in some games (like ToCS3) it clearly doesn't.

I don't think it does, at least not properly. At 8x, a bunch of HUD elements were garbled and didn't display correctly. It got progressively better as I toned down the MSAA

misyltoad commented 4 years ago

We do kinda need a proper way to implement warn: D3D9DeviceEx::SetRenderState: Unhandled render state D3DRS_MULTISAMPLEANTIALIAS Which might be related.

ryester19 commented 1 year ago

Good afternoon. I decided to revisit this issue again. Since then, I have upgraded this box to a RX 6400.

As of now, I'm getting a solid 60fps and around 72% GPU usage at 8x MSAA. For no MSAA, I see the GPU usage at around 66-68%. All the other settings are at high preset

I also saw back in version 1.8.1 that you did some optimization for MSAA in D3D9 games. For me, this issue seems to be resolved. Not sure if you're planning to keep this issue open until D3DRS_MULTISAMPLEANTIALIAS is properly implemented

Blisto91 commented 1 year ago

Thanks for testing again 👍