doitsujin / dxvk

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

Incorrect rendering in Anno 2070 (DX10 mode) #139

Closed Shished closed 6 years ago

Shished commented 6 years ago

Anno 2070 is rendering incorrectly when launched in DX10 mode in wine-vulkan with DXVK Screenshots: https://imgur.com/a/shtjU When map is zoomed out, whole screen is covered with textures, ocean is black unless fully zoomed in.

Software information

Anno 2070 with Deep Ocean addon and all DLCs. Screenshots were made with Very High preset, post processing was set to lowest. Game was also tested with all settings set to low, with the same results.

System information

Apitrace file(s)

https://drive.google.com/open?id=1yr85HINg9XtCX8-yoiXRKvhEx_s0rMYB

Log files

doitsujin commented 6 years ago

The apitrace you attached renders fine on my RX 480, might be a driver issue. Can anyone reproduce this (preferably on Maxwell or Pascal)?

Guy1524 commented 6 years ago

The Apitrace you linked runs perfectly on my pascal GTX 1050. The issue is probably with the limited vulkan support on the 600 series.

pingubot commented 6 years ago

@doitsujin : i am willing to help. So i need to use apitrace with wine and dxvk and load the trace ?

pingubot commented 6 years ago

@doitsujin : i tested the trace this way, hopefully it was correct (dxvk enabled in the prefix) ?:

/Downloads/apitrace/apitrace-msvc/x86/bin> WINEDEBUG=-all wine apitrace.exe replay ../../../Anno5.trace

The trace runs on my gtx 970 without the errors shown in the picture, but it is really slow, ~ 15-20fps most of the time, not sure if that is how it should be.

doitsujin commented 6 years ago

@pingubot @Guy1524 thanks for testing. Low performance when replaying traces is normal and does not reflect actual ingame performance. AFAIK apitrace decompresses the trace file on the fly, which costs quite a lot of CPU power.

@Shished Can you replay your trace with DXVK_DEBUG_LAYERS=1 set? I'm getting some complaints that a fragment shader doesn't write to all render targets, but that's it. If you see more errors, please let us know. My guess is that there are more Kepler-specific issues than I'm aware of.

Shished commented 6 years ago

https://pastebin.com/raw/qfmuv6gN

nairaner commented 6 years ago

It seems to also happen on Maxwell 1.0

valley

PathOfExile

@pdaniell-nv Can you help with this narrowing this glitch in any way?

pdaniell-nv commented 6 years ago

Nothing immediately comes to mind. Note that the "bufferImageGranularity" physical device limit is quite different between Maxwell 1.0 and Maxwell 2.0/Pascal. Any chance something is violating that limit?

daschaffert commented 6 years ago

Hi I'm getting the same glitches when replaying your dump... also have glitches in witcher3 and in skyrim I`m having a geforce gtx750ti

doitsujin commented 6 years ago

@pdaniell-nv That might indeed be a problem since my allocator does not maintain separate pools for images and buffers. Commit 42d49d7603401d662153b9fc4d94917f62c2bd92 should fix these violations.

Basically, that workaround enforces the value of bufferImageGranularity as the alignment for all images with VK_IMAGE_TILING_OPTIMAL. I'll see if I can alter the allocation strategy in the future since this will lead to more fragmentation and memory consumption on the affected GPUs. More recent GPUs should be practically unaffected by this change.

@nairaner @Shished please test with the aforementioned commit.

daschaffert commented 6 years ago

tested the replay with the commit - great work! no glitches so far! Will test my games now!

daschaffert commented 6 years ago

well also tested the witcher3 and hat not a single glitch! in all versions before somtimes glitches occured. The downside is that now every second or so I have the feeling that the picture "jumps" some frames kind of its stuck for an just barely feelable moment and then jumps on.

doitsujin commented 6 years ago

Looks like the original issue is fixed.

Shished commented 6 years ago

Can confirm. Rendering glitches gone. https://i.imgur.com/b0onE4E.jpg