Bug 109616

Summary: [ANV] Inconsistent mesh flickering with Witcher 3
Product: Mesa Reporter: nagrigoriadis
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: danylo.piliaiev, jason
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description nagrigoriadis 2019-02-12 18:07:47 UTC
When playing The Witcher 3 (from Steam) on a Kabylake Core i7-8650U on a Dell notebook with a UHD620 I get a inconsistent mesh flickering. It occurs in some places only, and is repeatable. But the flickering is very random.
I did a video recording of the issue here: https://drive.google.com/file/d/1Y8TBaMtc-dP4N-GRuHcR3OZzx9JaiODg/view

This is using DXVK 0.94 bundled with Proton 3.16-6. (and 0.96 too)

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
    Wine version: Wine 3.16 bundles with Proton 3.16-6
    DXVK version: DXVK 0.94 bundled with Proton 3.16-6 and DXVK 0.96
    OS: Gentoo Linux, 4.20.4, KDE5 desktop with compositing disabled.

Danylo (werman) reproduced it at https://github.com/doitsujin/dxvk/issues/876#issuecomment-458549675
As requested, a bug to track the issue.
Comment 1 Danylo 2019-02-13 10:22:17 UTC
The longer the game running the more apparent flickering is and on short traces it is very hard to see it and longer trace, well, they will take much longer to take. So for now I don't have a meaningful trace. 

But still will investigate the issue.

I have:

HD 620
Mesa Git
Proton 3.16-6
Arch Linux, 4.20.6
Comment 2 Denis 2019-02-14 10:51:15 UTC
hi guys. I also can reproduce this issue on this configuration:

i3-8100
GPU - Intel UHD Graphics 630
mesa - tested on latest master and release 18.0.0 (and 18.3.2, system)
OS - manjaro
Proton 3.16-6

Link to the apitrace (trace was maiden under wine):
https://drive.google.com/open?id=1oXmy_WAkJRpKaQAbyFL6J6n6qRsME1M8

What I can say - replaying this apitrace always reproduces flickering (exactly that one, when textures disappear and I see trees and sky (inside the cave) ).

I tested this trace on KBL (same configuration with Danylo), and can say that flickering is less, and not stable, as on CFL machine.

Hope this information may help to investigate the issue.
Comment 3 nagrigoriadis 2019-02-15 20:18:09 UTC
Thanks. I built latest GIT and tested.
Seems all good :-)
Comment 4 nagrigoriadis 2019-02-15 20:18:36 UTC
Sorry, wrong issue :-(
Comment 5 Danylo 2019-03-15 14:04:52 UTC
I think that this bug and https://bugs.freedesktop.org/show_bug.cgi?id=109630 (vkQuake flickering geometry under Intel) may be connected but still don't know what causes it and how to debug this.
Comment 6 nagrigoriadis 2019-03-19 13:17:19 UTC
Agreed, it seems to be exactly the same.
Some of the geometry disappearing for a frame every so often.
Comment 7 Denis 2019-08-08 11:42:55 UTC
commit bc612536eb2f0f77725103e53077ad5a28036ac3 (HEAD -> master, origin/master, origin/HEAD)
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Wed Jul 31 10:42:24 2019 -0500

    anv: Emit a dummy MEDIA_VFE_STATE before switching from GPGPU to 3D
    
    There is an object-level  preemption workaround which requires this.
    However, even without object-level preemption, we seem to have issues
    with geometry flickering when 3D and compute are combined in the same
    batch and this appears to fix it.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109630
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111267
    Cc: mesa-stable@lists.freedesktop.org
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>


Tested mesa-master with the commit on my CFL (checked on attached apitrace). Works without flickers now.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.