dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

Graphic bugs on Metal gear Solid The Phantom Pain using DXVK

Open zarebcn opened this issue 2 years ago • 34 comments

Hi, i have been trying to use DXVK on MGSTPP and i have detected some graphic bugs.

Im using an RX 570 with AMD drivers 22.3.2, without DXVK the graphics are perfectly fine but i tried to use DXVK because DX11 support on AMD side is a bit shit and i get some frame drops without gpu or cpu being maxed out.

I tried 4 versions of DXVK, since 1.10 to 1.10.3, and all of them got this bugs. Im using windows 10 fully updated by the way. On other games DXVK works perfectly fine.

Going to attach 2 pics of this bugs:

IMG20220804132923 IMG20220804133112

zarebcn avatar Aug 04 '22 11:08 zarebcn

We don't support Windows, and this is likely a driver bug since the game is known to work on Linux with the same DXVK versions.

Not to mention that your driver version is four months old at this point.

doitsujin avatar Aug 04 '22 11:08 doitsujin

Ok, i understand that you dont support windows but without DXVK graphics are perfectly fine and in all other games theres no issues with DXVK. Yeah, the drivers are 4 months old but the game is several years old, maybe i have to use some config on the dxvk.conf file or a problem with vulkan itself?

log files: mgsvtpp_d3d11.log mgsvtpp_dxgi.log

zarebcn avatar Aug 04 '22 12:08 zarebcn

Again, the problem is almost certainly the AMD driver, and probably specifically on older GPUs as well (they constantly break Vulkan stuff on Polaris, Vega, and even RDNA 1 sometimes). It works fine on RADV on the same hardware, it works fine on Nvidia, and I don't want to spend several days figuring out what might be going wrong and whether or not it's possible to work around this, since it's just not our target platform. Hence, no support.

The game being several years old doesn't have anything to do with... anything really. Please at least test it with an up-to-date driver (i.e. 22.7.1) before reporting an issue.

doitsujin avatar Aug 04 '22 12:08 doitsujin

@doitsujin I don't mean to be a jerk, but I see A TON of issues on this repo that always follow the same pattern: someone has a problem and they're either using Windows (sometimes even Windows 7), an old GPU, unsupported drivers,... you know the drill.

Wouldn't it be appropriate to have a warning dialog pop up when a DXVK DLL is loaded and it detects that it's not running in Wine? Maybe even straight up refuse to load? After all, DXVK is supposed to be used on Linux.

Just my opinion, feel free to disagree.

adolfintel avatar Aug 06 '22 17:08 adolfintel

It's been stated that DXVK on Windows is not officially supported by DXVK (iirc), and even if it were, support is not a right, as can be deducted from the license. Old GPUs may also not be getting Vulkan driver updates, and as such, DXVK may not properly work on them.

Edit: it's also pretty well known that you should be using the latest drivers anyways, as anything else may not contain what DXVK needs.

Another edit: keep in mind that these are my views, and not necessarily what the project follows. Don't blame the project for anything I say.

orowith2os avatar Aug 07 '22 00:08 orowith2os

Maybe even straight up refuse to load? After all, DXVK is supposed to be used on Linux.

Either that, or try to redirect it to the system's DirectX dlls instead, although I'm not sure if that's worth the hassle.

nipkownix avatar Aug 07 '22 01:08 nipkownix

Why would it be DXVK's responsibility to educate users by force? Really don't like the vibes of that idea. Imho a warning in the issue template for amdvlk-pro driver (and probably also -open, as that one regresses like crazy too; not to be confused with RADV) and asking users to re-test with RADV would be sufficient. It's not so much Windows vs. Linux when the game actually manages to load, such visual corruption issues are always shared between Windows and amdvlk-pro driver on Linux. It's also not like RDNA1/2 would necessarily show less issues with this driver and DXVK vs. e.g. Polaris.

aufkrawall avatar Aug 08 '22 00:08 aufkrawall

@aufkrawall I think it's needed because many of these users don't even know that DXVK is not supposed to be used on Windows.

Take a look at this example (from the PCGamingWiki page for GTA IV): image

The link points directly to the releases page, do you think the average GTA IV player will take time to go to the main page and read the readme file?

Look how many times people recommend using DXVK on Windows on PCGW: https://www.pcgamingwiki.com/w/index.php?search=dxvk&title=Special%3ASearch . The only page that has a warning is Stray because some good soul added it a few days ago.

Same thing on the Steam community, with this guy recommending using DXVK to play Stray on Windows 7 image

When these users inevitably run into issues, they're going to come here and open issues and then we have to explain them that they're not supposed to do that.

A simple warning message like the one below could be added here or in any other piece of code that's executed early during the initialization and will at least inform some these users.

DXVK is not designed to be used on Microsoft Windows.

You can continue but you may run into performance and/or stability issues, please DO NOT report these issues on Github.

To disable this message, add dxvk.disableWarnings=True to the config file.

Similar warnings could be added at the same location to warn people with old Kepler GPUs or with really old drivers.

adolfintel avatar Aug 08 '22 07:08 adolfintel

This issue is maybe derailing a bit so I'd suggest opening a new one if you have concerns or or want to discuss change suggestions.

fwiw I'm not personally a fan of outright disallowing dxvk to be used on windows. Even tho i understand the concern for having lots of reports that are mostly related to improper windows and dxvk compatibility do note that windows users can and have reported and brought legitimate dxvk issues to light.

Blisto91 avatar Aug 08 '22 09:08 Blisto91

This message is not for the DXVK developer but for this Linazis users.

Why not a message that say 'Burn in hell you heretic windows user!!' or some lines of code that overvolt our cpus and burn them... Geez!!

I didn't know that this was a Linux-only club, should i seat in the bus' backseats too? Some of your comments are a bit snobbish.

Im fine if you don't support windows, its ok for me but im not an standard user and i know what im doing.

I know too what DXVK is and what does, translates directx's calls to vulkan ones using a vulkan layer. Are directx dlls different on Linux? NO. Is vulkan different on windows? NO.

With that said, i just updated my graphic drivers to 22.7.1 and the bug remains the same so the issue is elsewhere but not on my side, my gpu is perfectly fine and runs ALL existent games.

Im not going to join your fanboy war between Linux and Windows because i never had a problem in using both systems, in fact i use Linux at work for developing. I find this wars childish.

Have a nice day, cheers!

zarebcn avatar Aug 08 '22 09:08 zarebcn

@zarebcn that really wasn't my intention, I'm sorry if I made you feel unwelcome in some way.

My proposal was simply to warn users about known issues on an unsupported platform so that the project doesn't get flooded with issues. There's no fanboy war going on.

Believe it or not, I've been on the other side of this for many years, if you look on my profile you'll see that I even have scripts to build WineD3D for windows that I've been maintaining since 2014 (and from 2016 through 2019 even mesa builds). It's bad, it's unsupported, often has stability issues, but sometimes it gets the job done when you want to play some broken old game on windows, before DXVK and dgVoodoo came along it was a godsend for windows users!
Of course, people have been abusing the hell out of it and sending me emails complaining that it doesn't work and expecting me to be able to fix it, that's why I suggested that maybe DXVK should have a warning, that's all.

I'll open a separate issue as Blisto suggested.

adolfintel avatar Aug 08 '22 10:08 adolfintel

@adolfintel I think that i understood it in the wrong way, i see your point. Sorry if i overreacted a bit but i just came here for informing of a bug and i felt that i was being annoying with my issue and got no support but complaints.

Va bene, saluti.

zarebcn avatar Aug 08 '22 10:08 zarebcn

@aufkrawall I think it's needed because many of these users don't even know that DXVK is not supposed to be used on Windows.

Well, if such hints are mentioned in game wikis etc., it is probably (relatively) safe to assume that the game in question generally works with DXVK on Windows. I don't want to turn a bug ticket into a driver flame war, but reality is that basically every game just works with DXVK on Windows with Nvidia when loading of the DLL is not an issue (which tends to happen, but it's obviously a minority of affected titles). I probably have run dozens of games with DXVK with Nvidia on Windows, and can't recall any case of visual corruption.

aufkrawall avatar Aug 08 '22 13:08 aufkrawall

Curious that I also have the same problems in this same game, with this same GPU (in Windows too) and DXVK is the only tool that allows me to play it well. I even thought about opening this issue a while ago.

WWSNK avatar Aug 08 '22 16:08 WWSNK

Try latest master. (driver needs to be up to date) https://github.com/doitsujin/dxvk/actions/runs/2822066051

Edit: updated link

Blisto91 avatar Aug 08 '22 17:08 Blisto91

@Blisto91 Tried with this build and the bug is still there. My drivers are up to date (22.7.1)

edit:

What i have noticed with this build is that i can start dx11 games without disabling Twitch Studio vulkan layer because with it enabled all dx11 games crash at start when i try to play with stable builds of DXVK.

Another thing that i have noticed with this build is that the gpu utilization is very high and where i had about 60-70% now i have 100% and get severe framedrops.

zarebcn avatar Aug 09 '22 12:08 zarebcn

I will try to check it out here later when i get home on Linux with the community drivers and see if i can repro a difference between master and 1.10.3. I have a R9 380

Blisto91 avatar Aug 09 '22 13:08 Blisto91

@Blisto91 On Metal Gear Phantom Pain i have it maxed out at 2k and i dont even reach 100% utilization with 1.10.3, with this one i had to drop resolution to 1080p and lowering some settings like post-processing.

I can attach pics if needed of both behaviours.

zarebcn avatar Aug 09 '22 13:08 zarebcn

When gpu isn't 100% it's usually because there is a cpu bottleneck or otherwise. Unless there is a fps or vsync cap. There have been some optimizations on master that should improve CPU bound performance. But if you FPS drops the same time as your GPU utilization goes up that sounds weird. Is it stutter or generally lower fps?

Try deleting the .cache file that dxvk generates and see if it improves after it's generated a new shader cache. Tho that should be done automatically when the cache version gets updated.

Can you check if there is a difference in how much Vram is used between the two versions?

Blisto91 avatar Aug 09 '22 13:08 Blisto91

@Blisto91 Yh, i use vsync cap at 60fps. Im pretty sure that i deleted .cache file but im going to try again and i'll take some pics

zarebcn avatar Aug 09 '22 13:08 zarebcn

1.10.3 IMG20220809154239 vram: 4067mb, gpu utilization: 82%, 60 solid fps.

IMG20220809154306 2k and max settings.

Master with same settings IMG20220809154746 vram: 3697mb, gpu utilization: 99-100%, 43 fps and still drops lower.

IMG20220809154953 settings that i have to use for getting 60 fps with master. Notice drop to 1080p and post-processing.

zarebcn avatar Aug 09 '22 14:08 zarebcn

How does it behave without vsync?

Also try disabling the overlay you are using and see if you see the same just using dxvk's own. Make a file called dxvk.conf next to the games exe (or where the logs generate) and insert dxvk.hud = full Post a screenshot of what that says.

Blisto91 avatar Aug 09 '22 14:08 Blisto91

Both 2k and max settings and vsync disabled but the game seems to cap at 60fps for me. Maybe caps at the display Hz.

Master IMG20220809164956


1.10.3 IMG20220809165718

zarebcn avatar Aug 09 '22 15:08 zarebcn

Please start taking screenshots.

K0bin avatar Aug 09 '22 15:08 K0bin

I'm not seeing any meaningful performance differences on my system between the two versions.

doitsujin avatar Aug 09 '22 16:08 doitsujin

Haven't reproduced either. Can you send a save game?

Also if you haven't tried then try disabling your twitch studio vulkan layer again

Blisto91 avatar Aug 09 '22 17:08 Blisto91

@K0bin Sadly i dont have any app installed for taking in game screenshots, AMD has a feature for this with relive tool but i have uninstalled it because it has some unresolved issues on newer drivers and crashes AMD radeon control panel.

@doitsujin I can only say that im not cheating with this, both pics are made at the same spot with the same settings. I dunno whats going on. But master build is the only one that i can launch without disabling Twitch Studio vulkan layer so something is different for sure, at least on my system.

@Blisto91 I had Twitch Studio vulkan layer disabled on both tests, im going to send my savegame and config files of my game but i dunno if you will be able to use it because i think that are linked to an user.

local.zip remote.zip

zarebcn avatar Aug 09 '22 19:08 zarebcn

Turns out that this was once again specific to the official AMD drivers. RADV and Nvidia are fine.

No idea why, but enabling the Vulkan 1.3 maintenance4 feature just completely destroys GPU-bound performance.

I disabled this feature now to work around this, DXVK doesn't really need it, although the relaxed interface matching rules are nice for buggy D3D games. But AMD should really take a look at this, there's no way that enabling this particular feature should cost that much performance (or really, any performance).

doitsujin avatar Aug 09 '22 23:08 doitsujin

@doitsujin If disabling this the performance is the same as in older versions is fantastic and if continues to launch games even without disabling twitch studio vulkan layers in my case it will be awesome.

In reference to the graphic corruption theres something that can be done? Maybe some config in the dxvk.conf file? Because is a pity that performance wise is perfect, far better than dx11 one, but the bug kills the immersion.

zarebcn avatar Aug 10 '22 13:08 zarebcn

Sorry for jamming myself in when the ping wasn't for me 😁

You can try messing with the conf options, tho i'm pretty sure it wont affect it. But doesn't hurt trying. This will most likely need a driver fix from amd. If my GPU wasn't unsupported with those drivers i would open one myself at the AMDVLK repo. A fix there might carry over to the windows drivers since they share alot of code afaik and is why it also reproduces the issue. Or atleast the funky trees I've been told.

You could try reporting it yourself for the windows drivers and see if anything comes out of it. I know they have a bug report tool in adrenalin or what it's called. Tho dunno what they'll think about a bug report with dxvk on windows, but you could say it's the same issue with AMDVLK on linux.

Blisto91 avatar Aug 10 '22 13:08 Blisto91