protonscr

The Witcher 3 shadows flickering on ANV

dxvkclosed intel anv
doitsujin/dxvk#876 · opened 2019-01-21 by grigi · updated 2019-09-01 · 20 comments · github
Ggrigi 2019-01-21 github

When playing The Witcher 3 (from Steam) on a Kabylake Core i7-8650U on a Dell notebook with a UHD620 I get a weird texture flickering when items are in shadow.
Generally the game is too dark,
I did a video recording https://drive.google.com/open?id=1MohQ4EGNQ94PDaS6a9wbjy5yIdYirE5G to highlight the issue.

This is using DXVK 0.94 bundled with Proton 3.16-6.

Software information

The Witcher 3 from Steam, 1280x720 all lowest except for texture resolution which is medium.

System information

  • GPU: Intel UHD620
  • Driver: AMV from mesa git (also happened on MESA 18.3.0)
  • Wine version: Wine 3.16 bundles with Proton 3.16-6
  • DXVK version: DXVK 0.94 bundled with Proton 3.16-6
  • OS: Gentoo Linux, 4.20.1 (and the same on 4.19.8), KDE5 desktop with compositing disabled.

I unfortunately did not do an APITrace. Generally the game runs as expected, except for the dark/flickering issue.
I understand this is below the minimum spec of the game, but is otherwise playing and enjoying the game, just the dark/flicker issue I am wishing to resolve here.

Ddoitsujin maintainer 2019-01-21 github

This is most likely a bug in ANV since the shadows render correctly on everything else. You might consider opening a Mesa bug.

Ggrigi 2019-01-21 github

Thank you for your quick response.
This is the Mesa bug: https://bugs.freedesktop.org/show_bug.cgi?id=109404

Ggrigi 2019-01-24 github

Issue is likely an invalid 1-bit boolean optimization. (and a patch is attached)

But now there is another issue: some polygons flicker, this allows you to sometimes see through cave walls and/or roofs for a single frame. Or some rocks in grass disappear for a frame.
(as issues go, it is far less immersion breaking, just some distracting flashes every now and then)

Ggrigi 2019-01-24 github

Here is a video to show the flickering I'm talking about: https://drive.google.com/file/d/1Y8TBaMtc-dP4N-GRuHcR3OZzx9JaiODg/view
It is particularly prevalent at this cave entrance.

@doitsujin Is this also a Mesa driver issue?

Ddoitsujin maintainer 2019-01-24 github

I've never seen this before, can you share a save?

Ggrigi 2019-01-24 github

Sure, here is the save right by that cave: https://drive.google.com/open?id=1kH7NlgW1MehWTNdR8J30t3injFfAthHr

Wwerman 2019-01-25 github

@grigi I'm the one who investigated the original issue - I hope it will be resolved soon (I'll probably involve someone more knowledgeable in that code).

About the cave - could you also show on map where is it? I'll take a look at it on Monday.

Ggrigi 2019-01-26 github

screenshot_20190126_093232

Hi @werman right here, just east of the "Crossroads" signpost.
And once again, thanks for your work :-)

Wwerman 2019-01-28 github

@grigi I have checked the cave and I didn't see such flickering, I have check with latest mesa master and with 18.3.1

I'm using Proton 3.16-6 Beta. And Intel HD Graphics 620.

If it's reproducible it would be great if you can provide apitrace.

Ggrigi 2019-01-29 github

I haven't managed to get time yet. Will get to it as soon as I can.

Wwerman 2019-01-29 github

I finally saw that flickering with DXVK and with wined3d in that cave, it's just too random and didn't want to happen while I was in motion.

I captured it with apitrace however flickering seems to be random even in it.

There is repeating:
INTEL-MESA: error: ../src/intel/vulkan/anv_descriptor_set.c:549: VK_ERROR_OUT_OF_POOL_MEMORY
in logs but I don't think it's relevant.

@doitsujin Small feedback about capturing traces:

In "Common-issues" it is advised to put certain DLLs near the game executable, in issue creation template it is said:
wine apitrace.exe trace -a dxgi YOURGAME.exe DO NOT use DXVK together with apitrace!

Ugh, I got confused and ended up editing Proton 3.16 Beta/proton making something like this:
run_wine([wine_path] + ["/path_to_apitrace/apitrace.exe", "trace", "-a", "dxgi"] + sys.argv[2:])

And apitrace crashed with wined3d but work nicely with DXVK.

I'm just trying to say that tracing probably need more explanation.

Thanks!

Ddoitsujin maintainer 2019-01-29 github

@werman yeah, tracing is tricky and which way works or is useful varies from case to case. I'll see if I can update the wiki and issue template accordingly.

Regarding the Vulkan error:

INTEL-MESA: error: ../src/intel/vulkan/anv_descriptor_set.c:549:
VK_ERROR_OUT_OF_POOL_MEMORY

DXVK uses this error return to determine when to create a new descriptor pool, so this is normal behaviour.

Ggrigi 2019-01-30 github

Just for an FYI, I built the latest Mesa git.
At first I thought the flickering has gone away, but the longer I played the worse the flickering got.

Ggrigi 2019-02-12 github

@werman Should I create a new issue on freedesktop.org to track the mesh flickering issue? Do you need anything from me that will help?

Wwerman 2019-02-12 github

Yes, please create one. You can add apitrace with the flickering.

And unfortunately this flickering is random even in apitrace so I wasn't able to quickly find the cause.

Ggrigi 2019-02-12 github

@werman I created the issue here: https://bugs.freedesktop.org/show_bug.cgi?id=109616
Could you please attach the apitrace you did to the issue?

Wwerman 2019-02-12 github

@grigi Yes, I'll add it tomorrow.

Ggrigi 2019-02-16 github

Mesa bug https://bugs.freedesktop.org/show_bug.cgi?id=109404 has been fixed and merged to master and eligible for backport to stable.

I'm keeping this open for the related mesa bug https://bugs.freedesktop.org/show_bug.cgi?id=109616

Ssebastianlacuesta 2019-09-01 github

@grigi: https://bugs.freedesktop.org/show_bug.cgi?id=109616 appears as RESOLVED FIXED.

Ddoitsujin maintainer 2019-09-01 github

Nice, closing this then.

Proton versions