doitsujin / dxvk

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

Flickering/missing Textures in Witcher 3 #440

Closed kakra closed 6 years ago

kakra commented 6 years ago

Software information

Witcher 3, highest settings excluding NV Hairworks

System information

Log files

Before submitting log files I'd like to know if something is maybe just broken with my installation because I couldn't find any other report of this quite severe visual problem. Witcher 3 renders correctly with vanilla wine tho performance is bad compared to DXVK. I made a short video clip to demonstrate the problem:

https://youtu.be/2y5IqHKgVnk

Is this a known problem of a wrong installation? In contrast, Skyrim SE works great with DXVK, it doesn't with vanilla wine.

If you need logs, let me know. Logging is completely turned off here because I see performance issues with default wine logging turned on, so I'd need to adjust my setup first.

martinpl commented 6 years ago

It is old driver problem, for Witcher you need 396.24.02 (vulkan beta).

kakra commented 6 years ago

It is the latest beta driver as downloadable from NVIDIA. It looks more like the flickering issue early wine vanilla versions had with Witcher 3. According to NVIDIA download archives, this version is already beyond the Vulkan beta driver and is the recommended latest driver.

Is it possible that NVIDIA download version names do not include sub-version? Because I downloaded my version of 396.24 on Apr, 26nd. But the download archives say "released on May, 2nd".

I just compared the installed driver and a freshly downloaded, identical:

kakra@jupiter ~ $ ls -al {/usr/portage/distfiles,/home/kakra/downloads}/NVIDIA-Linux-x86_64-396.24.run
-rw-r--r-- 1 kakra   kakra   86545234 20. Jun 08:36 /home/kakra/downloads/NVIDIA-Linux-x86_64-396.24.run
-rw-rw-r-- 1 portage portage 86545234 26. Apr 18:20 /usr/portage/distfiles/NVIDIA-Linux-x86_64-396.24.run
kakra@jupiter ~ $ md5sum {/usr/portage/distfiles,/home/kakra/downloads}/NVIDIA-Linux-x86_64-396.24.run
7b5c4735a5b7ad3a9d166ca85cc88e17  /usr/portage/distfiles/NVIDIA-Linux-x86_64-396.24.run
7b5c4735a5b7ad3a9d166ca85cc88e17  /home/kakra/downloads/NVIDIA-Linux-x86_64-396.24.run
martinpl commented 6 years ago

https://developer.nvidia.com/linux-3962402 - download https://developer.nvidia.com/vulkan-driver - info

kakra commented 6 years ago

Oh wow, why is this on a completely separate page? I'll try later today. Thanks for the link.

Leopard1907 commented 6 years ago

I'm on 396.24.02 and there is no problem like that.

Graphics: Card-1: Intel Device 591b bus-ID: 00:02.0 chip-ID: 8086:591b Card-2: NVIDIA Device 1c8d bus-ID: 01:00.0 chip-ID: 10de:1c8d Display Server: X.Org 1.19.5 driver: nvidia Resolution: 1920x1080@60.01hz GLX Renderer: GeForce GTX 1050/PCIe/SSE2 GLX Version: 4.6.0 NVIDIA 396.24.02 Direct Rendering: Yes

Although Skyrim SE is not working for me. Even with Lutris DXVK.

Zeioth commented 6 years ago

@kakra With that combination of driver + DXVK you need to add this line.

On lutris, right click on your game > System options > Environment variables > Add __GL_NextGenCompiler with the value 1

In case you are not using lutris, just write this in a terminal before to open the game:

export __GL_NextGenCompiler=0

Use @MartinPL solution only if you are compiling DXVK from Github, or using the binaries from haagch. But if you downloaded DXVK from releases (as recomemded), please, use my solution.

Zeioth commented 6 years ago

@MartinPL true, it seems to be fixed with 396.24.02 + DXVK 0.44 but with the latest build from master you'll get the next error:

err:   Required Vulkan extension VK_EXT_vertex_attribute_divisor not supported
err:   Required Vulkan extension VK_KHR_maintenance2 not supported
err:   DxvkAdapter: Failed to create device
err:   D3D11CoreCreateDevice: Failed to create DXGI device
Leopard1907 commented 6 years ago

@Zeioth Is that advice for me or OP?

Because i can run Witcher 3 and Gta 5 with DXVK 0.54 and it doesn't need that workaround.

Only problem is Skyrim SE which game boots but can't get past loading screen either with new game option or using a previous save.

doitsujin commented 6 years ago

@Zeioth current master requires the winevulkan updates from Wine 3.10.

Similarly, using the old Nvidia shader compiler is probably not going to work because I removed the workarounds for it. I'm kind of hoping that they get a new stable driver out of the door soon which contains the necessary Vulkan fixes, until then it's either using 396.24.02 or sticking to DXVK v0.54.

Zeioth commented 6 years ago

doitsujin you are right as usual, thank you.

jarrard commented 6 years ago

"Although Skyrim SE is not working for me. Even with Lutris DXVK."

Like Fallout4 you need a custom fix for skyrimse otherwise you will get a black screen on launch, there may be ini workarounds like disabling intro videos but I couldn't get them to work.

If your using AMD gpu then you could use glorious eggroll wine edition (arch build). I spin my own collection of patches however, arch is life!

Leopard1907 commented 6 years ago

@jarrard

I installed it on a complete new prefix also , like i did with Gta 5 and Witcher 3.

By intro video , you mean animations at loading screens? That is where game hangs , animations keep playing but when i look at the at the HDD led on my laptop ; there is zero activity. It should load files but looks like something is blocking it.

Drive is EXT4 btw. I'm on Nvidia Gpu with 396.24.02 driver , using Nvidia Prime.

kakra commented 6 years ago

To jump in back for Skyrim SE: It's properly working here. But you're going to need two DLL overrides to native: Set xaudio2_7 and dsound to "native,builtin". Also, I experienced such problems when using custom Xbox controller wrappers/remappers. Don't use them. Wine has great support for it since SDL was integrated into winebus.sys. Set the games to use builtin for all xinput DLL variants.

There's a chance that one of my cherry-picks makes a difference for Skyrim SE: https://github.com/kakra/wine/tree/patches-3.10/wined3d (there are a few other branches, consider it as it is: these are no scientific cherry-picks)

kakra commented 6 years ago

Okay, this is fixed now thanks to @Zeioth, putting the export into my PoL startup script fixed the issue. There seem only very very minor rendering issues left which can be seen as black triangles. Here's an example but I also saw them around Ard Skellige along the mountain sides in the distance: https://youtu.be/F1e-0MDSYg8

I think this can be closed when all parts come together: Updated NVIDIA drivers and updated DXVK. I expect I can remove the export again by then.

Thanks to all for figuring this out so fast.

PS: The stuttering in the video is due to recording with OBS, it hurts performance a lot. :-(

Leopard1907 commented 6 years ago

@kakra Despite adding xaudio2_7 and dsound i still can't past that screen. Background music started to play though.

Either something is very wrong with my system or your cherry picks are doing a trick on there.

BTW , game also has same issue on plain Wine Staging to. 3.10 and 3.9 was the tested ones.

Glad that your Witcher problem solved btw.

kakra commented 6 years ago

@Leopard1907 I'm using vanilla wine with only my patch series applied. You can checkout the different branches (versioned against vanilla wine, one for each category) and create a single patch from it with "git format-patch --stdout wine-3.xx" against the wine base version. Then either apply them to your source tree (but then you could also merge and rebase), or put those patches into your distribution package manager and let it rebuild wine from sources. That's how I do it in Gentoo and why I've chosen that workflow.

BTW: Without background music playing, the game engine scripts will freeze and you cannot even complete the intro. Also, NPC voices won't play.

Another BTW: If you are switching between staging and vanilla in the same wine prefix, there will be left-over DLL overrides for CSMT. You have to clean those up manually in the registry and system32.

doitsujin commented 6 years ago

Sounds like this can be closed.