vkd3d-proton icon indicating copy to clipboard operation
vkd3d-proton copied to clipboard

Visual bugs and crashing in Far Cry 6

Open DoomPenguin9 opened this issue 2 years ago • 84 comments

Compiling vkd3d-proton-master is the only way to play Far Cry 6 on Linux at the moment but there are some bugs and the game is not fully playable.

The first issue is that the text in the menus does not show if you compile vkd3d-proton-master as it is, you have to add key.u.texture.allowed_swizzle = true; here before compiling to work around it.

The second issue flickering which you can see in this video https://www.youtube.com/watch?v=0psf8wDt048&t=3s

The third, and biggest problem I've encountered is the game crashing in menus. If you open your map, the game has a very high chance of crashing the AMDGPU driver. The same goes for interacting with quest givers, crafting benches, etc.

PC Specs: OS: Arch Linux Kernel: 5.14.9-zen2-1-zen Mesa 21.3.0-devel (git-305b170229) CPU: Ryzen 7 5800x GPU: RX 6700 XT

DoomPenguin9 avatar Oct 08 '21 13:10 DoomPenguin9

The first issue is that the text in the menus does not show if you compile vkd3d-proton-master as it is, you have to add key.u.texture.allowed_swizzle = true; here before compiling to fix it.

That is not a fix, it's a hack that violates the Vulkan specification. The problem is that the game creates an A8 UAV. Without insane workarounds this pretty much needs a Vulkan extension to add VK_FORMAT_A8_UNORM or an extension to allow swizzles on storage images.

DadSchoorse avatar Oct 08 '21 14:10 DadSchoorse

The first issue is that the text in the menus does not show if you compile vkd3d-proton-master as it is, you have to add key.u.texture.allowed_swizzle = true; here before compiling to fix it.

That is not a fix, it's a hack that violates the Vulkan specification. The problem is that the game creates an A8 UAV. Without insane workarounds this pretty much needs a Vulkan extension to add VK_FORMAT_A8_UNORM or an extension to allow swizzles on storage images.

I am not a programmer so I do tend to use the word "fix" quite liberally, sorry about that. I corrected my original post.

DoomPenguin9 avatar Oct 08 '21 15:10 DoomPenguin9

For me editing resource.c didn't seem to do anything. Can anyone confirm that it actually works?

Update: I'm using the closed nVidia drivers on a GTX 970.

SR-dude avatar Oct 08 '21 16:10 SR-dude

The hack might only work on radv, at least that's what the person who originally came up with it used. It's invalid behavior so this very much depends on your hardware and driver.

DadSchoorse avatar Oct 08 '21 16:10 DadSchoorse

For me editing resource.c didn't seem to do anything. Can anyone confirm that it actually works?

Update: I'm using the closed nVidia drivers on a GTX 970.

As @DadSchoorse said, this might not work on Nvidia. I can confirm it works with both RADV and AMDVLK. Anyway, I believe it is better to not bother with this hack since even if it does work around the first issue, the game crashes my graphics driver and there is some flickering, so we should probably wait for the vkd3d devs to sort things out instead of trying to hack our way around these issues.

DoomPenguin9 avatar Oct 08 '21 17:10 DoomPenguin9

Yeah, the game loads up great with Nvidia, but there's no text in the menus. Shame. If any logs or anything are needed I'm happy to provide them but it seems you all already know the issue

gardotd426 avatar Oct 08 '21 23:10 gardotd426

I was able to blindly find my way and run the benchmark. I couldn't see any text, so I don't know what the results were. But, I get the sense that they were really close to windows. The flickering is a game buster for me. It happen with nvidia's proprietary drivers, as well. Are you guys sure that the issue with the text isn't a directwrite issue?

SR-dude avatar Oct 08 '21 23:10 SR-dude

I managed to compile vkd3d-proton and the game launches, but no text (even after attempting the hack).

kernel: 5.14.9-zen2-1-zen lib32-nvidia-utils 470.74-1 nvidia-dkms 470.74-1 nvidia-settings 470.74-1 nvidia-utils 470.74-1

05f4:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.4.0.
05f4:info:vkd3d_instance_init: vkd3d-proton - build: 1ca9ec72849fc8b0.
...
05f4:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x400.
05f4:info:vkd3d_bindless_state_get_bindless_flags: Device does not support VK_VALVE_mutable_descriptor_type.
05f4:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 4608, may be inaccurate.
05f4:info:d3d12_device_determine_ray_tracing_tier: DXR support enabled.
05f8:fixme:d3d12_device_SetResidencyPriority: iface 0000000013750030, object_count 1, objects 0000000004d2ef40, priorities 0000000004d2ef10 stub!
05f8:fixme:d3d12_swapchain_init: Ignoring swap effect 0x4.
05f8:fixme:d3d12_swapchain_init: Ignoring buffer usage 0x60.
05f8:fixme:d3d12_swapchain_init: Ignoring swapchain flags 0x42.
...
05f8:fixme:d3d12_swapchain_CheckColorSpaceSupport: iface 0000000005520790, colour_space 0, colour_space_support 0000000004d2e700 semi-stub!
05f8:fixme:d3d12_swapchain_SetColorSpace1: iface 0000000005520790, colour_space 0 semi-stub!
05f8:fixme:d3d12_swapchain_SetHDRMetaData: iface 0000000005520790, type 0, size 0, metadata 0000000000000000 semi-stub!warn:  DXGI: MakeWindowAssociation: Ignoring flags
05f8:fixme:vkd3d_create_texture_view: Cannot handle MinResourceLOD clamp of 4.000000 correctly.
05f8:fixme:d3d12_swapchain_Present1: Ignored present parameters 0000000004d2f6f0.
...
WINE VERSION = 6.18-GE-1 (Staging)
...
05f8:fixme:d3d12_swapchain_resize_buffers: Ignoring flags 0x42.
warn:  DXGI: MakeWindowAssociation: Ignoring flags
05f8:fixme:d3d12_swapchain_Present1: Ignored present parameters 0000000004d2f6f0.
05f8:fixme:d3d12_swapchain_Present1: Ignored present parameters 0000000004d2f6f0.

matty-r avatar Oct 09 '21 23:10 matty-r

Yeah as stated it doesn't work on Nvidia.

gardotd426 avatar Oct 09 '21 23:10 gardotd426

I know that a proper fix for the text issue will take a while but what about the other two issues I mentioned? If they get fixed then the game will at least be fully playable for those with AMD GPUs.

DoomPenguin9 avatar Oct 11 '21 00:10 DoomPenguin9

Same issue as above, No text, seemed to crash when trying to run the bechmark. PC Specs: OS: Arch Linux: EndeavourOS Linux" (64 bit) Kernel: 5.14.12-zen1-1-zen Video Driver: 4.6.0 NVIDIA 495.29.05 CPU: AMD Ryzen 7 5800X 8-Core Processor GPU: NVIDIA Corporation NVIDIA GeForce RTX 2070/PCIe/SSE steam-13660078484926496768.log.tar.gz

Ross-Carran avatar Oct 17 '21 02:10 Ross-Carran

Tried again with lqx kernel current nvidia vulkan dev and proton experimental no crashes. Added screen shots of what the flashes and pixel stuff looks like.

Far Cry® 62021-10-17-16-6-44 . Far Cry® 62021-10-17-16-6-57 Far Cry® 62021-10-17-16-7-8

proton-experimental-log.tar.gz

Ross-Carran avatar Oct 17 '21 03:10 Ross-Carran

Since apitrace doesn't seem to work with this game and crashes instantly upon trying to replay the trace, I've made a gfxreconstruct capture instead. Not sure how helpful this is but replaying the capture hangs the GPU just like the actual game would.

Capture RX 6700 XT Mesa Git (91ff83b6c87) VKD3D-Proton commit c3a92a0 with key.u.texture.allowed_swizzle = true; hack https://drive.google.com/file/d/1Jb9iNdwNKf8jEiKxvkzo_eqOoRYt8NhS/view?usp=sharing

jas0n098 avatar Oct 18 '21 12:10 jas0n098

Might be worth testing if this helps with the text issues, although I don't have high hopes since A8 UAVs are required by 12_0. https://github.com/DadSchoorse/vkd3d/tree/dont-report-a8-uav

DadSchoorse avatar Oct 27 '21 16:10 DadSchoorse

Might be worth testing if this helps with the text issues, although I don't have high hopes since A8 UAVs are required by 12_0. https://github.com/DadSchoorse/vkd3d/tree/dont-report-a8-uav

The game doesn't even launch for me anymore. It gets stuck on the splash screen with "warm up PSO cache" and nothing happens. EDIT: That was a Wine issue which I sorted out but the text issue is not fixed.

DoomPenguin9 avatar Oct 28 '21 21:10 DoomPenguin9

Yeah I couldn't get the game to launch with @DadSchoorse's code at first (same behavior as @DoomPenguin9, but I did get it launched eventually). Same text issues.

gardotd426 avatar Oct 28 '21 23:10 gardotd426

I have NVIDIA RTX 2070 and Arch linux. When I was testing week ago, I've downloaded game from EPIC and then I had problems with text too. Recently I've redownloaded game from Ubisoft Connect on russian language and I see 5/6 letters. So I still don't have some letters, but a lot of them are visible. But still have some glitches like blinking screen and artifacts.

doatta avatar Oct 29 '21 05:10 doatta

The game straight up crashes if you try to start a new game, load a game, or start the benchmark. You also can't access the the video menu(you can click on it but nothing happens). I think this started after the most recent patch.

DoomPenguin9 avatar Nov 03 '21 13:11 DoomPenguin9

The game straight up crashes if you try to start a new game, load a game, or start the benchmark. You also can't access the the video menu(you can click on it but nothing happens). I think this started after the most recent patch.

Which version? On the top left in the ingame menu it says 1.1.1 for me and it's still working... well, besides the texture issues and bad performance.

alex9k1 avatar Nov 03 '21 14:11 alex9k1

The game straight up crashes if you try to start a new game, load a game, or start the benchmark. You also can't access the the video menu(you can click on it but nothing happens). I think this started after the most recent patch.

Which version? On the top left in the ingame menu it says 1.1.1 for me and it's still working... well, besides the texture issues and bad performance.

Version 1.1.1

DoomPenguin9 avatar Nov 03 '21 15:11 DoomPenguin9

The Vulkan spec version is completely irrelevant.

K0bin avatar Nov 03 '21 15:11 K0bin

Same crashing behavior for me as well,

Running on RTX 3080 Distro: Arch-linux Tried on bot wine wine-ge 6.18 and 6.20 Tried vkd3d-proton with and without the "hack".

So far, the text output is still not working, as for the game, it flickers.

ifoughal avatar Nov 10 '21 06:11 ifoughal

the inventory,map bug is very similar to the Cyberpunk2077 inventory bug. at main menu turn down shadows to low, and volumetric fog as well... enjoy. (tested enough to feel confident, yet unsure what about these two settings is angering vkd3d)

future updates did relieve cp2077 of this issue yet it was dev updates not vulkan/mesa

lunacorn avatar Nov 21 '21 14:11 lunacorn

the inventory,map bug is very similar to the Cyberpunk2077 inventory bug. at main menu turn down shadows to low, and volumetric fog as well... enjoy. (tested enough to feel confident, yet unsure what about these two settings is angering vkd3d)

future updates did relieve cp2077 of this issue yet it was dev updates not vulkan/mesa

I can't even get FC6 to launch properly anymore. It either doesn't launch at all(with latest tkg) or I get the splash screen an it just hangs until I use xkill to kill it. The only wine version I can get the game to launch with is 6.17-tkg but if I try to load a game or start a new game, it just crashes and I can't even click on half the options in the menu, like the video setting for example. What wine version are you using to get it to run?

DoomPenguin9 avatar Nov 23 '21 03:11 DoomPenguin9

Yeah I couldn't get the game to launch with @DadSchoorse's code at first (same behavior as @DoomPenguin9, but I did get it launched eventually). Same text issues.

How did you get it to run? I can only run the game with wine tkg 6.17 but it's buggy with it and crashes when I try to load a game or start a new one. Oh, and I also can't click on half the settings in the menu for some reason. With wine versions other than 6.17-tkg the game just hangs on the splash screen.

DoomPenguin9 avatar Nov 23 '21 22:11 DoomPenguin9

Yeah I couldn't get the game to launch with @DadSchoorse's code at first (same behavior as @DoomPenguin9, but I did get it launched eventually). Same text issues.

How did you get it to run? I can only run the game with wine tkg 6.17 but it's buggy with it and crashes when I try to load a game or start a new one. Oh, and I also can't click on half the settings in the menu for some reason. With wine versions other than 6.17-tkg the game just hangs on the splash screen.

Last time I tried I was using the lutris-ge-6.20 build of wine and built vkd3d-proton with key.u.texture.allowed_swizzle = true. Had some flickering in the benchmark, but at least the first few minutes of the game seemed to work just fine. Settings all worked too, as far as I could tell.

alex9k1 avatar Nov 23 '21 22:11 alex9k1

@alex9k1 are you on AMD or Nvidia? I'm just trying to see if the "there's no text visible on Nvidia" situation has changed. Last I checked it was the same (though I have gotten it to launch with later than 6.17 I believe).

gardotd426 avatar Nov 23 '21 23:11 gardotd426

I'm just trying to see if the "there's no text visible on Nvidia" situation has changed

It has not changed.

K0bin avatar Nov 24 '21 00:11 K0bin

I figured not. Am I correct in recalling that it will likely require a new Vulkan extension?

gardotd426 avatar Nov 24 '21 01:11 gardotd426

@alex9k1 are you on AMD or Nvidia? I'm just trying to see if the "there's no text visible on Nvidia" situation has changed. Last I checked it was the same (though I have gotten it to launch with later than 6.17 I believe).

AMD

alex9k1 avatar Nov 24 '21 01:11 alex9k1