protonscr

Battlefield 4 broken shaders (white and black flickering)

dxvkclosed feature setd3d11
doitsujin/dxvk#275 · opened 2018-04-13 by cRaZy-bisCuiT · updated 2020-07-23 · 33 comments · github
CcRaZy-bisCuiT 2018-04-13 github

Software information

Latest Battlefield 4, downloaded via Origin.

System information

  • GPU: AMD RX 480
  • Driver: OpenGL version string: 3.0 Mesa 18.0.0
  • Wine version: wine 3.5-1
  • DXVK version: Version 0.41 (and also current master as of today)

Apitrace file(s)

  • Put a link here

Log files

Ddoitsujin maintainer 2018-04-13 github

Battlefield 4 requires rendering to a linear buffer, which is not supported. Vulkan doesn't support this natively so it'll require some workarounds and hacks to make this work.

warn:  D3D11: Cannot create render target view for a buffer
CcRaZy-bisCuiT 2018-04-13 github

Allright. I heard there're patches for that but I don't know where to search them. Do you have some hints/links for me what to search for?

In addition: Does this mean neither Vulkan nor DXVK can fix these problems in the future and hacks need to be applied all the time?

Ddoitsujin maintainer 2018-04-13 github

I'm not aware of any patches that would fix this issue.

No, it doesn't mean that DXVK will never implement it. It just means that it's going to be hard to do, and since BF3/4 and possibly Dragon Age Inquisition seem to be the only games that need it, it has very low priority.

CcRaZy-bisCuiT 2018-04-13 github

Well, thank you!

Not sure if that's the same thing...!?
https://github.com/doitsujin/dxvk/issues/158

@davvvve1 said:

They made a patch some dude in discord . Works on bf 4 but after i died the grafics went bad , But after a restart of the game it works again

Ddoitsujin maintainer 2018-04-13 github

That patch was only a single line of code that allowed the game to run, nothing more.

CcRaZy-bisCuiT 2018-04-13 github

I see, so thank you I'll just leave this open and see if I might find some time to look into the issue or someone else does.

Ppingubot 2018-04-13 github

one of the guys in discord has it running and with an adjusted config it seems to run fine on nvidia at least. Iirc, the new beta driver improved the situation additionally afaik. I have bf3 running fine here. MSAA is not possible, it kills perf with the new nv driver and crashes with the old one. Everything else is fine beside a game restart is necessary after dying or finishing a level cause of garbled textures otherwise.

Ddavvvve1 2018-04-14 github

Strange thing . Its not all the time the graphics being garbled . If you run a campain try die many times. Sometimes it work and sometimes its more or less garble. Hope you understand my bad English

CcRaZy-bisCuiT 2018-04-15 github

Do all of you use nVidia? Or does someone sometimes get non-broken graphics with Mesa and AMD and Mesa? If it works: Which Mesa version do you have?

Ddavvvve1 2018-04-15 github

I use only nvidia . I have a rx560 4gb as back up .

TTrollwut 2018-04-23 github

one of the guys in discord has it running and with an adjusted config it seems to run fine on nvidia at least. Iirc, the new beta driver improved the situation additionally afaik. I have bf3 running fine here. MSAA is not possible, it kills perf with the new nv driver and crashes with the old one. Everything else is fine beside a game restart is necessary after dying or finishing a level cause of garbled textures otherwise.

Do you have any link to that or a quote? Would like to test out a bit more

Rrobiniseenbanaan 2018-04-27 github

Hi,I think I fixed the issue, If you enable VAAPI in the staging tab the visuals are fine.

TTrollwut 2018-04-28 github

Have it enabled, but I still get those glitching/flickering bullet trails and smokes.

Also: Loading a map and the game runs FINE. But on map change / server change, graphics are fucked up with that flickering stuff. So I need to restart the game (not only quit from server and rejoin, but close BF4, start up again) and it's fine again.

Can you tell me with which version of WINE and DXVK you did it?

EDIT: Golmund Railway always has flickering and shit. Maybe that's a map to investigate

Ddavvvve1 2018-04-28 github

Enabled VAAPI to . Dont work. Diffrent maps works like a charm but many dont . Battlefield 3 has the same problem .

TTrollwut 2018-05-02 github

The game worked fine for about 1 week now, but today it's been fristrating, again.

AFAIK no updates or other shit - I didn't even restart my PC between two runs, but EVERY map now has ground textures missing and heavy flickering. https://i.imgur.com/8cuof7u.jpg

I've got VAAPI checked and run without the Lutris' runtime, but it doesn't matter now how I do it - flickering and shizzle.

Running proprietary nvidia 390.48-11 on Arch Linux. WINE version doesn't matter: staging 3.5, 3.5, 3.7, 3.anything... everywhere the same error

Any other idea I might try?

TTrollwut 2018-05-02 github

Ok, seems to be connected to graphics options again. This is mine for now: https://i.imgur.com/jPM1K1C.jpg

TL;DR Medium settings overall with disabled Anti-aliasing and fancy stuff

Little bummer with having a GTX 1080, but it gets playable again

Still the following behaviour: Loading one map will run it fine, no problems. (except for very few maps, like Golmud Railway, which always has bullet trail flickering and more problems)

On map change (or leave map and go to another server), flickering and other problems appear for 100%. So after finishing a map, I always have to close the game and re-run it - then it's fine again for one map.

I might investige more which graphic setting does this shit in particular, but as I always have to reload the whole game and map, I don't have much energy to do that

Ppingubot 2018-05-04 github

My bet would be terain setting, that also does not work on maximum in bf3.

Ddavvvve1 2018-05-12 github

Anyone tried to patch/hack the shaderstuff ?

Ppingubot 2018-05-26 github

Hi,

for me that issue is fixed in BF3 with latest master. Can you guys recheck for the BF4 status ?

Many thanks !
Christian

Ppingubot 2018-06-02 github

@cRaZy-bisCuiT , @Trollwut : This issue should be fixed, please retest. Many thanks !

?ghost 2018-06-17 github

I can confirm that BF4 works fine now on my gtx 770 with 396.24.02 drivers, no flickering or other graphical glitches.

Ddoitsujin maintainer 2018-06-17 github

Thanks for confirming.

TTrollwut 2018-06-17 github

Sorry, didn't have enough time to test, but tested it now.

Yes, can change maps now like I want without graphical glitches :) Didn't test all maps, but those broken maps.

Arch Linux, everything up to date, nvidia proprietary

CcRaZy-bisCuiT 2018-06-19 github

Does anyone test it with AMD Mesa? I'll try when I find some time, maybe tonight. Sorry for not getting back to you - I'm kinda busy atm.

Ddavvvve1 2018-06-23 github

Yes . Im on Arch with mesa-git and latest dxvk 0.60 No problems here . Running from lutris

Zzaggynl 2018-11-14 github

I'm getting the see through/white shaders with mesa and dxvk 0.91
Device: Radeon RX Vega (VEGA10, DRM 3.27.0, 4.19.2-041902-generic, LLVM 8.0.
0) (0x687f)

Ddoitsujin maintainer 2018-11-14 github

Known issue, seems to be some sort of Mesa/LLVM regression.

?ghost 2020-07-16 github

Is anyone able to upload me their compiled shaders? Compiling takes forever on my PC and it makes the game unplayable.

Sorry for going head first on a 2 year old issue.

KK0bin maintainer 2020-07-16 github

That would require someone to have the same GPU and exact same driver as you.

The legality of uploading shaders is also questionable given that you're sharing game assets.

Maybe try Fossilize.

CcRaZy-bisCuiT 2020-07-16 github

How could you statically compile these Shaders? These stuttering is happening all the time while you start a map. No caching seems to take place. RX 480 + Mesa @Archlinux.

TTrollwut 2020-07-16 github

How could you statically compile these Shaders? These stuttering is happening all the time while you start a map. No caching seems to take place. RX 480 + Mesa @archlinux.

have you set a folder for your generated cache?

This is me having Origin games set via Lutris:

It's, well, simply a path to some folder. In this case, in the WINE directory (but doesn't have to be there).

Maybe it doesn't save shader cache if no directory is being specified. You might want to check this.

CcRaZy-bisCuiT 2020-07-21 github

Thanks! I don't use Lutris, but since this is a ENV I could set that manually I guess.

?ghost 2020-07-23 github

That would require someone to have the same GPU and exact same driver as you.

The legality of uploading shaders is also questionable given that you're sharing game assets.

Maybe try Fossilize.

@K0bin Exact same driver version as well? Because it would suck very much if I had to recompile each time mesa updates. I have no idea what Fossilize should do for me and how to use it. Can you please explain?

Upstream links